Hive
  1. Hive
  2. HIVE-5524

Unwanted delay in getting Hive metastore connection with METASTORE_CLIENT_CONNECT_RETRY_DELAY/

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.10.0
    • Fix Version/s: 0.13.0
    • Component/s: None
    • Labels:
      None

      Description

      Reference: http://svn.apache.org/repos/asf/hive/trunk/metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java

      >>>>
      for (URI store : metastoreUris) {
      ....
      ...
      if (isConnected)

      { break; }

      }

      // Wait before launching the next round of connection retries.
      if (retryDelaySeconds > 0) {
      try

      { LOG.info("Waiting " + retryDelaySeconds + " seconds before next connection attempt."); Thread.sleep(retryDelaySeconds * 1000); }

      catch (InterruptedException ignore) {}
      }
      >>>>

      By default "hive.metastore.client.connect.retry.delay" is set to 1 second. If it is set to 10 seconds, this code will wait for 10 seconds even if a successful connection is made in first attempt itself.

      This can be avoided by changing to

      >>>>
      if (!isConnected && retryDelaySeconds > 0) {
      ....
      >>>>

      1. HIVE-5524.patch
        0.7 kB
        Rajesh Balamohan

        Activity

        Rajesh Balamohan created issue -
        Rajesh Balamohan made changes -
        Field Original Value New Value
        Status Open [ 1 ] Patch Available [ 10002 ]
        Affects Version/s 0.11.0 [ 12323587 ]
        Affects Version/s 0.10.0 [ 12320745 ]
        Rajesh Balamohan made changes -
        Status Patch Available [ 10002 ] Open [ 1 ]
        Rajesh Balamohan made changes -
        Attachment HIVE-5524.patch [ 12608131 ]
        Harsh J made changes -
        Status Open [ 1 ] Patch Available [ 10002 ]
        Affects Version/s 0.11.0 [ 12323587 ]
        Brock Noland made changes -
        Status Patch Available [ 10002 ] Resolved [ 5 ]
        Fix Version/s 0.13.0 [ 12324986 ]
        Resolution Fixed [ 1 ]
        Ashutosh Chauhan made changes -
        Assignee Rajesh Balamohan [ rajesh.balamohan ]

          People

          • Assignee:
            Rajesh Balamohan
            Reporter:
            Rajesh Balamohan
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development