Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-22102

Reduce HMS call when creating HiveSession

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Trivial
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.0.0
    • Component/s: HiveServer2
    • Labels:
      None

      Description

      When establishing HiveSession, it ends up configuring session variables/settings.

      As part of it, it ends up checking the database details. https://github.com/apache/hive/blob/master/service/src/java/org/apache/hive/service/cli/session/HiveSessionImpl.java#L314

      Even if it is `default` DB, it ends up making this check. In corner cases, these calls turn out to be expensive.

      2019-08-13T03:16:57,189  INFO [b42ba57f-1740-4174-855d-4e3f08319ca5 HiveServer2-Handler-Pool: Thread-1552313] metadata.Hive: Total time spent in this metastore function was greater than 1000ms : getDatabase_(String, )=13265
      

      We can just skip this check if its `DEFAULT_DATABASE_NAME` (default) DB. This may not be an issue for CachedStore.

        Attachments

        1. HIVE-22102.1.patch
          1 kB
          Rajesh Balamohan

          Activity

            People

            • Assignee:
              rajesh.balamohan Rajesh Balamohan
              Reporter:
              rajesh.balamohan Rajesh Balamohan
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: