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

Improve the fetch size in HiveConnection

    XMLWordPrintableJSON

Details

    Description

      If the 4.x Hive Jdbc client connects to an older HS2 or other thrift implementations, it might throw the IllegalStateException: https://github.com/apache/hive/blob/master/jdbc/src/java/org/apache/hive/jdbc/HiveConnection.java#L1253-L1258, as the remote might haven't set the property:  
      hive.server2.thrift.resultset.default.fetch.size back to the response of OpenSession request. It also introduces the confusing on what the real fetch size the connection is, as we have both initFetchSize and defaultFetchSize in this HiveConnection, the HiveStatement checks the initFetchSize, defaultFetchSize and 
      HIVE_SERVER2_THRIFT_RESULTSET_DEFAULT_FETCH_SIZE.defaultIntVal to obtain the real fetch size, we can make them one in HiveConnection, so every statement created from the connection uses this new fetch size.
       

      Attachments

        Issue Links

          Activity

            People

              dengzh Zhihua Deng
              dengzh Zhihua Deng
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: