Uploaded image for project: 'IMPALA'
  1. IMPALA
  2. IMPALA-11304

impala-shell: Make the client retry attempts configurable

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • Impala 4.2.0
    • None
    • None

    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 

       

       

       

      Attachments

        Activity

          People

            wzhou Wenzhe Zhou
            arawat Abhishek Rawat
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: