You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues-all@impala.apache.org by "guojingfeng (Jira)" <ji...@apache.org> on 2020/11/30 04:41:00 UTC
[jira] [Commented] (IMPALA-8962) FETCH_ROWS_TIMEOUT_MS should apply
before rows are available
[ https://issues.apache.org/jira/browse/IMPALA-8962?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17240474#comment-17240474 ]
guojingfeng commented on IMPALA-8962:
-------------------------------------
Hey there, as far as my observe in production workloads. Impala JDBC not handle STILL_EXECUTING_STATUS status yet, if hs2 server returned STILL_EXECUTING_STATUS, Impala JDBC client just treat it as non-success response and CloseOperation then. Query will success but fetched 0 rows. Blow is the simple Query Timeline:
{code:java}
Query Timeline
Query submitted: 23.14us (23141)
Planning finished: 15ms (15790373)
Submit for admission: 24ms (24359386)
Completed admission: 24ms (24935014)
Ready to start on 32 backends: 25ms (25742722)
All 32 execution backends (103 fragment instances) started: 35ms (35729121)
Rows available: 3.79s (3785223683)
Execution cancelled: 13.80s (13799731822) // Hit FETCH_ROWS_TIMEOUT_MS which is 10 seconds by default.
Released admission control resources: 13.80s (13805262698)
Unregister query: 13.82s (13821489812)
{code}
I had viewed source code of ImpalaJDBC generated by JD. Pseudo code like that:
{code:java}
try {
TFetchResultsResp tFetchResultsResp = this.m_client.FetchResults(tFetchResultsReq);
checkIfRespNull((TBase)tFetchResultsResp, str);
checkResponseStatus(tFetchResultsResp.getStatus(), str); // This check only treat TStatusCode.SUCCESS_STATUS and TStatusCode.SUCCESS_WITH_INFO_STATUS as success or threw exceptions.
} catch (Exception exception) {
throw exception;
} finally {
safeCloseOperation(tOperationHandle);
} {code}
So are there some jobs need to do on ImpalaJDBC to support Non-blocking mode for Fetch() RPC ?
> FETCH_ROWS_TIMEOUT_MS should apply before rows are available
> ------------------------------------------------------------
>
> Key: IMPALA-8962
> URL: https://issues.apache.org/jira/browse/IMPALA-8962
> Project: IMPALA
> Issue Type: Bug
> Components: Clients
> Reporter: Sahil Takiar
> Assignee: Sahil Takiar
> Priority: Major
> Fix For: Impala 3.4.0
>
>
> IMPALA-7312 added a fetch timeout controlled by the query option {{FETCH_ROWS_TIMEOUT_MS}}. The issue is that the timeout only applies after the *first* batch of rows are available. The issue is that both Beeswax and HS2 clients call {{request_state->BlockOnWait}} inside {{ImpalaServer::FetchInternal}}. The call to {{BlockOnWait}} blocks until rows are ready to be consumed via {{ClientRequestState::FetchRows}}.
> So clients can still end up blocking indefinitely waiting for the first row batch to appear.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-all-unsubscribe@impala.apache.org
For additional commands, e-mail: issues-all-help@impala.apache.org