Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 4.0

Thrift Hive Server

Warning
titleWARNING!

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. See HIVE-2935.

Once Hive has been built using steps in Getting Started, the Thrift server can be started by running the following:

Code Block
languagebash
title0.8 and Later
$ build/dist/bin/hive --service hiveserver --help
usage: hiveserver
 -h,--help                        Print help information
    --hiveconf <property=value>   Use value for given property
    --maxWorkerThreads <arg>      maximum number of worker threads,
                                  default:2147483647
    --minWorkerThreads <arg>      minimum number of worker threads,
                                  default:100
 -p <port>                        Hive Server port number, default:10000
 -v,--verbose                     Verbose mode

$ bin/hive --service hiveserver
Code Block
languagebash
title0.7 and Earlier
$ build/dist/bin/hive --service hiveserver --help
usage HIVE_PORT=xxxx ./hive --service hiveserver
  HIVE_PORT : Specify the server port

$ bin/hive --service hiveserver

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.

Code Block
$ ant test -Dtestcase=TestJdbcDriver -Dstandalone=true
$ ant test -Dtestcase=TestHiveServer -Dstandalone=true

The service supports clients in multiple languages. For more details see Hive Client.

Note
titleTroubleshooting: 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.