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

document threading model of Streaming API

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 0.14.0
    • 2.3.0
    • HCatalog, Transactions
    • None

    Description

      The model is not obvious and needs to be documented properly.

      A StreamingConnection internally maintains 2 MetaStoreClient objects (each has 1 Thrift client for actual RPC). Let's call them "primary" and "heartbeat". Each TransactionBatch created from a given StreamingConnection, gets a reference to both of these MetaStoreClients.
      So the model is that there is at most 1 outstanding (not closed) TransactionBatch for any given StreamingConnection and for any given TransactionBatch there can be at most 2 threads accessing it concurrently. 1 thread calling TransactionBatch.heartbeat() (and nothing else) and the other calling all other methods.

      Attachments

        1. HIVE-14778.patch
          2 kB
          Eugene Koifman

        Activity

          People

            ekoifman Eugene Koifman
            ekoifman Eugene Koifman
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 1h
                1h
                Remaining:
                Remaining Estimate - 1h
                1h
                Logged:
                Time Spent - Not Specified
                Not Specified