[ 
https://issues.apache.org/jira/browse/IMPALA-11304?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17626395#comment-17626395
 ] 

ASF subversion and git services commented on IMPALA-11304:
----------------------------------------------------------

Commit 8e350d0a8a7c95810c7704c8a5264a60daed783d in impala's branch 
refs/heads/dependabot/maven/fe/org.eclipse.jetty-jetty-server-9.4.41.v20210516 
from wzhou-code
[ https://gitbox.apache.org/repos/asf?p=impala.git;h=8e350d0a8 ]

IMPALA-11304: impala-shell make the client retry attempts configurable

Currently max tries for connecting to coordinator is hard coded to 4
in hs2-http mode. It's required to make the max tries when connecting
to coordinator a configurable option, especially in the environment
where coordinator is started slowly.

This patch added support for configurable max tries in hs2-http mode
using the new impala-shell config option '--connect_max_tries'.
The default value of '--connect_max_tries' is set to 4.

Testing:
 - Ran e2e shell tests.
 - Ran impala-shell with connect_max_tries as 100 before starting
   impala coordinator daemon, verified that impala-shell connects to
   coordinator after coordinator daemon was started.

Change-Id: I5f7caeb91a69e71a38689785fb1636094295fdb1
Reviewed-on: http://gerrit.cloudera.org:8080/19105
Reviewed-by: Andrew Sherman <[email protected]>
Tested-by: Impala Public Jenkins <[email protected]>


> impala-shell: Make the client retry attempts configurable
> ---------------------------------------------------------
>
>                 Key: IMPALA-11304
>                 URL: https://issues.apache.org/jira/browse/IMPALA-11304
>             Project: IMPALA
>          Issue Type: Improvement
>            Reporter: Abhishek Rawat
>            Assignee: Wenzhe Zhou
>            Priority: Major
>
> In hs2-http mode max tries is hard coded to 4. Would be good to make this 
> option configurable.
> {code:java}
> class ImpalaHS2Client(ImpalaClient):
>   """Impala client. Uses the HS2 protocol plus Impala-specific extensions."""
>   def __init__(self, *args, **kwargs):
>     super(ImpalaHS2Client, self).__init__(*args, **kwargs)
>     self.FINISHED_STATE = TOperationState._NAMES_TO_VALUES["FINISHED_STATE"]
>     self.ERROR_STATE = TOperationState._NAMES_TO_VALUES["ERROR_STATE"]
>     self.CANCELED_STATE = TOperationState._NAMES_TO_VALUES["CANCELED_STATE"]
>     # If connected, this is the handle returned by the OpenSession RPC that 
> needs
>     # to be passed into most HS2 RPCs.
>     self.session_handle = None
>     # Enable retries only for hs2-http protocol.
>     if self.use_http_base_transport:
>       # Maximum number of tries for idempotent rpcs.
>       self.max_tries = 4
>     else:
>       self.max_tries = 1
>     # Minimum sleep interval between retry attempts.
>     self.min_sleep_interval = 1 {code}
>  
>  
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to