Hive Beeline Client Usage
Beeline is started with the JDBC URL of the HiveServer2, which depends on the address and port where HiveServer2 was started. By default, it will be (localhost:10000), so the address will look like jdbc:hive2://localhost:10000.
Step 1 - Copy hive-jdbc-2.1.0-standalone.jar from $HIVE_HOME/jdbc/ to $HIVE_HOME/lib/ folder.
Step 2 - Change the directory to /usr/local/hive/bin
Step 3 - Start hiveserver2 daemon
OR
Step 4 - Start beeline client
Step 5 - Connect to hiveserver2
Step 6 - To list all the tables those are in default database.
Please share this blog post and follow me for latest updates on
Beeline is started with the JDBC URL of the HiveServer2, which depends on the address and port where HiveServer2 was started. By default, it will be (localhost:10000), so the address will look like jdbc:hive2://localhost:10000.
Step 1 - Copy hive-jdbc-2.1.0-standalone.jar from $HIVE_HOME/jdbc/ to $HIVE_HOME/lib/ folder.
$ cp $HIVE_HOME/jdbc/hive-jdbc-2.1.0-standalone.jar $HIVE_HOME/lib/
$ cd $HIVE_HOME/bin
$ hiveserver2
$ hive --service hiveserver2 &
$ beeline
beeline> !connect jdbc:hive2://localhost:10000 "" ""
jdbc:hive2://localhost:10000> show tables;
Comments
Post a Comment