installing and running beeline client


I work with a Hortonworks HDP 2.5 distro of Big Data hadoop/hiveserver2. I have been wondering for sometime now what it would take to run beeline client on another machine to connect to Hive or Knox.

After some work, I managed to get beeline client running with a minimal set of jar files on another machine outside of the cluster. The crucial bit was identifying the set of jar files involved using the jvm option: -verbose:class

After collecting the necessary jar files, beeline can be started using a java commandline.

java -Xmx1024m -classpath apache-log4j-extras-1.2.17.jar:avatica-1.8.0.2.5.0.0-1245.jar:calcite-core-1.2.0.2.5.0.0-1245.jar:calcite-linq4j-1.2.0.2.5.0.0-1245.jar:commons-cli-1.2.jar:commons-codec-1.4.jar:commons-collections-3.2.2.jar:commons-configuration-1.6.jar:commons-lang-2.6.jar:commons-logging-1.1.3.jar:curator-client-2.6.0.jar:curator-framework-2.6.0.jar:derby-10.10.2.0.jar:guava-14.0.1.jar:hadoop-annotations-2.7.3.2.5.0.0-1245.jar:hadoop-auth-2.7.3.2.5.0.0-1245.jar:hadoop-common-2.7.3.2.5.0.0-1245.jar:hadoop-mapreduce-client-core-2.7.3.2.5.0.0-1245.jar:hive-beeline-1.2.1000.2.5.0.0-1245.jar:hive-exec-1.2.1000.2.5.0.0-1245.jar:hive-jdbc-1.2.1000.2.5.0.0-1245.jar:hive-jdbc-1.2.1000.2.5.0.0-1245-standalone.jar:jce.jar:jline-2.12.jar:jsse.jar:log4j-1.2.16.jar:rt.jar:slf4j-log4j12-1.7.10.jar:sunec.jar:sunjce_provider.jar:super-csv-2.2.0.jar:xercesImpl-2.9.1.jar -Dhdp.version=2.5.0.0-1245 -Djava.net.preferIPv4Stack=true -Dhdp.version=2.5.0.0-1245  -Dhadoop.log.dir=/home/userid -Dhadoop.log.file=hadoop.log -Dhadoop.home.dir=/home/userid -Dhadoop.id.str=userid -Dhadoop.root.logger=INFO,console -Djava.library.path=:/home/userid -Dhadoop.policy.file=hadoop-policy.xml  -Djava.net.preferIPv4Stack=true -Djava.util.logging.config.file=/home/userid/parquet-logging.properties -Dlog4j.configuration=beeline-log4j.properties -Dhadoop.security.logger=INFO,NullAppender org.apache.hadoop.util.RunJar /home/userid/hive-beeline-1.2.1000.2.5.0.0-1245.jar org.apache.hive.beeline.BeeLine -n userid -p pass -u "jdbc:hive2://knox.company.com:8000/;ssl=true;transportMode=http;httpPath=gateway/tdcprd/hive"

There was no need to install beeline or any hadoop app.

Java 8 JRE is required.

Advertisements

Leave a comment

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s