Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-13148 Address some HMS connection issues in HS2
  3. HIVE-13149

Remove some unnecessary HMS connections from HS2

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.0.0
    • 2.3.0
    • HiveServer2
    • None

    Description

      In SessionState class, currently we will always try to get a HMS connection in start(SessionState startSs, boolean isAsync, LogHelper console) regardless of if the connection will be used later or not.

      When SessionState is accessed by the tasks in TaskRunner.java, although most of the tasks other than some like StatsTask, don't need to access HMS. Currently a new HMS connection will be established for each Task thread. If HiveServer2 is configured to run in parallel and the query involves many tasks, then the connections are created but unused.

        @Override
        public void run() {
          runner = Thread.currentThread();
          try {
            OperationLog.setCurrentOperationLog(operationLog);
            SessionState.start(ss);
            runSequential();
      

      Attachments

        1. HIVE-13149.1.patch
          3 kB
          Aihua Xu
        2. HIVE-13149.2.patch
          3 kB
          Aihua Xu
        3. HIVE-13149.3.patch
          3 kB
          Aihua Xu
        4. HIVE-13149.4.patch
          6 kB
          Aihua Xu
        5. HIVE-13149.5.patch
          8 kB
          Aihua Xu
        6. HIVE-13149.6.patch
          10 kB
          Aihua Xu
        7. HIVE-13149.7.patch
          10 kB
          Aihua Xu
        8. HIVE-13149.8.patch
          16 kB
          Aihua Xu

        Issue Links

          Activity

            People

              aihuaxu Aihua Xu
              aihuaxu Aihua Xu
              Votes:
              0 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: