Details
-
Improvement
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
-
ghx-label-4
Description
In hs2-http mode max tries is hard coded to 4. Would be good to make this option configurable.
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