The configuration key hive.server2.transport.mode
in kubernetes/conf/hive-site.xml
specifies the transport mode of the HiveServer2 Thrift service.
binary
for the default mode using Thrift RPChttp
for the HTTP mode which sends Thrift RPC messages over HTTP transportall
for enabling both modes (with HIVE-5312)
Specifying Thrift port numbers
The following environment variables in kubernetes/env.sh
specify Thrift port numbers.
$ vi kubernetes/env.sh
HIVE_SERVER2_PORT=9852 # for binary
HIVE_SERVER2_HTTP_PORT=10001 # for http
Note that if hive.server2.transport.mode
is set to all
, both port numbers should be specified
because HiveServer2 runs two Thrift services concurrently.
For Helm,
the fields hive/port
and hive/httpport
in kubernetes/helm/hive/values.yaml
specify Thrift port numbers.
$ vi kubernetes/helm/hive/values.yaml
hive:
port: 9852 # for binary
httpport: 10001 # for http
Liveness and readiness probes
The liveness and readiness probes of HiveServer2 performs TPC checks on the port for the default mode.
$ vi kubernetes/yaml/hive.yaml
readinessProbe:
tcpSocket:
port: 9852
livenessProbe:
tcpSocket:
port: 9852
The user can use HTTP checks if hive.server2.transport.mode
is set to http
or all
, but only if SSL is disabled.
$ vi kubernetes/yaml/hive.yaml
readinessProbe:
httpGet:
path: /cliservice
port: 10001
livenessProbe:
httpGet:
path: /cliservice
port: 10001
The user can check the log of HiveServer2 to see if HiveServer2 Thrift services start properly.
2020-10-01T03:19:24,129 INFO [main] thrift.ThriftCLIService: Started ThriftHttpCLIService in https mode on port 10001 path=/cliservice/* with 5...500 worker threads
...
2020-10-01T03:19:24,253 INFO [main] thrift.ThriftCLIService: Starting ThriftBinaryCLIService on port 9852 with 5...500 worker threads