Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

(hive) Enable HTTP & Binary transport modes in HiveServer2?

avatar

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.

1 ACCEPTED SOLUTION

avatar
hide-solution

This problem has been solved!

Want to get a detailed solution you have to login/registered on the community

Register/Login
10 REPLIES 10

avatar

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.

avatar

Found that there is working being done to allow both in the same HiveServer2: https://issues.apache.org/jira/browse/HIVE-5312

avatar

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

avatar
hide-solution

This problem has been solved!

Want to get a detailed solution you have to login/registered on the community

Register/Login

avatar

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"

avatar

Good catch, thanks. It's corrected now.

avatar

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.

avatar

You need to correct the hiveconf settings in the hiveserver2 start command, you mixed binary with http port.

avatar

Fixed, thank you