Thrift Hive Server
HiveServer is an optional service that allows a remote client to submit requests to Hive, using a variety of programming languages, and retrieve results. HiveServer is built on Apache ThriftTM (http://thrift.apache.org/), therefore it is sometimes called the Thrift server although this can lead to confusion because a newer service named HiveServer2 is also built on Thrift. Since the introduction of HiveServer2, HiveServer has also been called HiveServer1.
HiveServer cannot handle concurrent requests from more than one client. This is actually a limitation imposed by the Thrift interface that HiveServer exports, and can't be resolved by modifying the HiveServer code.
HiveServer2 is a rewrite of HiveServer that addresses these problems, starting with Hive 0.11.0. Use of HiveServer2 is recommended.
Thrift's interface definition language (IDL) file for HiveServer is
hive_service.thrift, which is installed in
Once Hive has been built using steps in Getting Started, the Thrift server can be started by running the following:
After starting the server, to test if the server is working well, run the hiveserver and jdbc tests in 'standalone' mode. The HIVE_PORT is assumed to be 10000 on localhost for this case.
The service supports clients in multiple languages. For more details see Hive Client.
Troubleshooting: Connection Error
Hive server and clients communicate through Thrift and FB303 services. In some distributions, both the Hadoop and Hive distributions have different versions of libthrift.jar and libfb303.jar. If they are incompatible, it may cause a Thrift connection error when running the unit test on standalone mode. The solution is to remove the Hadoop's version of libthrift.jar and libfb303.jar.