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

[Client, JDBC] Expose async interface through hive JDBC.

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Patch Available
    • Minor
    • Resolution: Unresolved
    • 2.3.2
    • None
    • Clients, JDBC

    Description

      This exposes async API in HiveStatement (jdbc module)

      The JDBC interface always have had strict synchronous APIs. 
      So the hive JDBC implementation also had to follow it though the hive server is fully asynchronous.

      Developers trying to build proxies on top of hive servers end up writing thrift client from scratch to make it asynchronous and robust to its restarts.
      The common pattern is

      1. Submit query, get operation handle and store in a persistent store
      2. Poll and wait for completion
      3. Stream results
      4. In the event of restarts, restore OperationHandle from persistent store and continue execution.

      The patch does 2 things

      • exposes operation handle (once a query is submitted) getOperationhandle() 
        Developers can persist this along with the actual hive server url getJdbcUrl
      • latch APIs
        Developers can create a statement and latch on to an operation handle that was persisted earlier. For latch, the statement should be created from the actual hive server URI connection in which the query was submitted.

      Attachments

        1. HIVE-18338.patch.4
          10 kB
          Amruth Sampath
        2. HIVE-18338.patch.3
          9 kB
          Amruth Sampath
        3. HIVE-18338.patch.2
          8 kB
          Amruth Sampath
        4. HIVE-18338.patch.1
          8 kB
          Amruth Sampath
        5. HIVE-18338.patch
          8 kB
          Amruth Sampath

        Activity

          People

            amrk7 Amruth Sampath
            amrk7 Amruth Sampath
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 20m
                20m