Versions Compared

Key

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

...

  1. The SessionHandle and OperationHandle in the HiveServer2 is able to convert to the SessionHandle and OperationHandle in the FLIP-91;
  2. The interfaces exposed by the HiveServer2 can be converted into related calls in Flink GatewayService;

Handle Mapping

The structure of the Handle in the HiveServer2 is as follows.

...

Code Block
languagejava
public interface GatewayService {
    
    /**
     * Fetch the Operation-level log from the GatewayService.
     */
    ResultSet fetchLog(
        SessionHandle sessionHandle, 
        OperationHandle operationHandle, 
        FetchOrientation orientation, 
        int maxRows);
    
   /**
    * Only supports FORWARD/BACKWARD. 
    * - Users can only BACKWARD from the current offset once.
    * - The Gateway don't not materialize the changelog.
    */
    ResultSet fetchResult(
        SessionHandle sessionHandle, 
        OperationHandle operationHandle, 
        FetchOrientation orientation, 
        int maxRows
    );
}

enum FetchOrientation {
    FORWARD,
    BACKWARD
}
 

...

Option name

Default value(Required)

Description

hiveserver2.catalog.hive-conf-dir

(none)(Yes)

URI to your Hive conf dir containing hive-site.xml. The URI needs to be supported by Hadoop FileSystem. If the URI is relative, i.e. without a scheme, local file system is assumed. If the option is not specified, hive-site.xml is searched in class path.

hiveserver2.catalog.name

hive (no)

hive catalog name

hiveserver2.catalog.default-database

(none) (Yes)

The default database to use when the catalog is set as the current catalog.

hiveserver2.thrift.bind-port


8084(No)

The port of the HiveServer2 endpoint

hiveserver2.thrift.worker.min-threads

5(No)

HiveServer2 uses TThreadPoolServer, which use the ThreadPool inside.


hiveserver2.thrift.worker.max-threads

512(No)

hiveserver2.thrift.worker.alive-duration

60 s(No)

hiveserver2.transport.mode

binary/http (tcp)

Currently only supports binary mode.

Usage Example


Code Block
languageyml
endpoint.protocol: hiveserver2
endpoint.hiveserver2.port: 9002
endpoint.hiveserver2.catalog.hive-conf-dir: /path/to/catalog

...