Use the following steps to validate your installation:
Start Hive Metastore service.
Login as $HIVE_USER nohup hive --service metastore>$HIVE_LOG_DIR/hive.out 2>$HIVE_LOG_DIR/hive.log &
Smoke Test Hive.
Open Hive command line shell.
hive
Run sample commands.
show databases; create table test(col1 int, col2 string); show tables;
Start HiveServer2.
/usr/lib/hive/bin/hiveserver2 >$HIVE_LOG_DIR/hiveserver2.out 2> $HIVE_LOG_DIR/hiveserver2.log &
Smoke Test HiveServer2.
Open Beeline command line shell to interact with HiveServer2.
/usr/lib/hive/bin/beeline
Establish connection to server.
!connect jdbc:hive2://$hive.server.full.hostname:10000 $HIVE_USER password org.apache.hive.jdbc.HiveDriver
Run sample commands.
show databases; create table test2(a int, b string); show tables;
where:
$HIVE_USER
is the user that owns the HIVE services. For example,hive
.$HIVE_LOG_DIR
is the directory for storing the Hive Server logs. This directory name is a combination of a directory and the$HIVE_USER
.