Index: docs/xdocs/hiveclient.xml =================================================================== --- docs/xdocs/hiveclient.xml (revision 0) +++ docs/xdocs/hiveclient.xml (revision 0) @@ -0,0 +1,274 @@ + + + + + + + HiveClient - Apache Hive - Apache Software Foundation + Hadoop Hive Documentation Team + + + +
+ + + +

This page describes the different clients supported by Hive. The command line client currently only supports an embedded server. The JDBC and thrift-java clients support both embedded and standalone servers. Clients in other languages only support standalone servers. For details about the standalone server see Hive Server.

+ +

Command Line

+ +

Operates in embedded mode only, that is, it needs to have access to the Hive libraries. For more details see Getting Started.

+ +

JDBC

+ +

For embedded mode, the uri is just "jdbc:hive://". For a standalone server, the uri is "jdbc:hive://host:port/dbname" where host and port are determined by where the Hive server is run. For example, "jdbc:hive://localhost:10000/default". Currently, the only dbname supported is "default".

+ +

JDBC Client Sample Code

+ + + + + +

Running the JDBC Sample Code

+ + /tmp/a.txt +echo -e '2\x01bar' >> /tmp/a.txt + +HADOOP_CORE={{ls $HADOOP_HOME/hadoop-*-core.jar}} +CLASSPATH=.:$HADOOP_CORE:$HIVE_HOME/conf + +for i in ${HIVE_HOME}/lib/*.jar ; do + CLASSPATH=$CLASSPATH:$i +done + +java -cp $CLASSPATH HiveJdbcClient +]]> + + +

JDBC Client Setup for a Secure Cluster

+ +

To configure Hive on a secure cluster, add the directory containing hive-site.xml to the CLASSPATH of the JDBC client.

+ + + +

Python

+ +

Operates only on a standalone server. Set (and export) PYTHONPATH to build/dist/lib/py.

+ +

The Python modules imported in the code below are generated by building Hive.

+ +

Please note that the generated Python module names have changed in Hive trunk.

+ + + + +

PHP

+ +

Operates only on a standalone server.

+ +open(); + +// run queries, metadata calls etc +$client->execute('SELECT * from src'); +var_dump($client->fetchAll()); +$transport->close(); +]]> + + +

Thrift Java Client

+ +

Operates both in embedded mode and on a standalone server.

+ + +

ODBC

+ +

Operates only on a standalone server. See Hive ODBC.

+ + +

Thrift C++ Client

+ +

Operates only on a standalone server. In the works.

+ + +
+ + + +
Index: docs/stylesheets/project.xml =================================================================== --- docs/stylesheets/project.xml (revision 1433808) +++ docs/stylesheets/project.xml (working copy) @@ -22,20 +22,26 @@ Hadoop Hive Hadoop Hive - + - + - - + + + + + + + + Index: docs/stylesheets/site.vsl =================================================================== --- docs/stylesheets/site.vsl (revision 1433808) +++ docs/stylesheets/site.vsl (working copy) @@ -295,6 +295,10 @@ #getProjectImage() + ## end the "container" div & start a new div to prevent menu indentation + +
+ @@ -307,7 +311,7 @@