You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

Once Hive has been built using steps in GettingStarted, the thrift server can be started by running the following:

$ 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.

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

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

NOTE:

  • !HiveServer is multithreaded and was designed to support multiple concurrent client connections. However, there is currently no test coverage for this scenario. If you want to play it safe we recommend running one HiveServer process per client connection. Please see JIRA: HIVE-80 for more information.
  • Hive server and clients communicates 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 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.
    a
  • No labels