Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

JDBC driver is recommended for the client side to interact with HS2. Note that there are some use cases (e.g. Hadoop Hue) where Thrift client is used directly and JDBC is bypassed.

Here is a flow sequence of API calls when making involved to make the first query:

  • The JDBC client (e.g. beeline) creates a HiveConnection by initiating a transport connection (e.g. TCP connection) followed by issuing a TOpenSessionReq to get the SessionHandle.
  • HiveStatement contains SessionHandle information and pass it to HS2 along with the query information.
  • HS2 receives the request and the driver (which is a CommandProcessor) is responsible for query parsing and compilation. HS2 kick off a background job to talk to Hadoop and then returns response to client. This is an asynchronous design of the ExecuteStatement API. The response contains OperationHandle information which client can use to poll the status of the query execution.  

...