Created 09-25-2015 08:37 PM
What do you recommend for enabling both HTTP & Binary transport mode for HiveServer2?
This is needed to support Knox, which requires HTTP, and clients which only support Binary mode, such as the Hive Ambari View.
Created 10-30-2015 05:42 AM
Glad to hear that HIVE-5312 will allow a single HS2 instance to run both modes simultaneously. In the meantime you have a couple options...
Two HS2 instances on a single host
Note: the second instance will not be managed by Ambari
Start HS2 manually, and override transport mode and port properties:
su - hive /usr/hdp/current/hive-server2/bin/hiveserver2 \ -hiveconf hive.metastore.uris=' ' \ -hiveconf hive.server2.transport.mode=http \ -hiveconf hive.server2.thrift.http.port=10001 \ >/var/log/hive/hiveserver2.out 2> /var/log/hive/hiveserver2.log &
Alternatively, you may duplicate the config directory[1] and set environment variable HIVE_CONF_DIR instead of overriding the hive.server2 properties with -hiveconf.
[1] HDP 2.3+: /etc/hive/conf/conf.server | HDP < 2.3: /etc/hive/conf.server
Two HS2 instances on different hosts
Note: using Ambari is preferable, however you can apply the manual steps from the previous section for clusters managed by Ambari 1.x or without Ambari
Standard values:
Created 09-25-2015 08:44 PM
As per my understanding the property hive.server2.transport.mode in hive-site.xml is used to control the transport mode, you can set it to either http or binary. You could potentially run two HiveServer2 services each using its own config property value for hive.server2.transport.mode one running in binary mode and the other in http.
Created 09-25-2015 08:49 PM
Found that there is working being done to allow both in the same HiveServer2: https://issues.apache.org/jira/browse/HIVE-5312
Created 09-25-2015 08:49 PM
Hello
There currently is work undertaken to help on this situation: https://issues.apache.org/jira/browse/HIVE-5312
In mean time a way about this might be mutiple Hiveserver2's, in your case two,configured one for http and one for binary. In hive-site.xml editing the hive.server2.transport.mode config
Created 10-30-2015 05:42 AM
Glad to hear that HIVE-5312 will allow a single HS2 instance to run both modes simultaneously. In the meantime you have a couple options...
Two HS2 instances on a single host
Note: the second instance will not be managed by Ambari
Start HS2 manually, and override transport mode and port properties:
su - hive /usr/hdp/current/hive-server2/bin/hiveserver2 \ -hiveconf hive.metastore.uris=' ' \ -hiveconf hive.server2.transport.mode=http \ -hiveconf hive.server2.thrift.http.port=10001 \ >/var/log/hive/hiveserver2.out 2> /var/log/hive/hiveserver2.log &
Alternatively, you may duplicate the config directory[1] and set environment variable HIVE_CONF_DIR instead of overriding the hive.server2 properties with -hiveconf.
[1] HDP 2.3+: /etc/hive/conf/conf.server | HDP < 2.3: /etc/hive/conf.server
Two HS2 instances on different hosts
Note: using Ambari is preferable, however you can apply the manual steps from the previous section for clusters managed by Ambari 1.x or without Ambari
Standard values:
Created 10-30-2015 06:48 AM
To start HS2 manually, recommendation is to start with the option "-hiveconf hive.metastore.uris=' '", basically starts . Also make sure that you either set HIVE_CONF_DIR to point to your new configs before running hiveserver2 command or pass the two overriding parameter as hiveconf arguments to hiveserver2 command. For Standard values you probably meant to say "hive.server2.transport.mode=binary & hive.server2.thrift.port=10000"
Created 10-30-2015 05:34 PM
Good catch, thanks. It's corrected now.
Created 10-30-2015 05:51 PM
Now that you mention my omission of HIVE_CONF_DIR, I realize it's simpler to override the hive.server2 properties rather than duplicate the entire configs. "Two HS2 instances on a single host" has been updated with this change.
Created 10-30-2015 05:54 PM
You need to correct the hiveconf settings in the hiveserver2 start command, you mixed binary with http port.
Created 10-30-2015 06:21 PM
Fixed, thank you