Use these steps to validate your installation.
Start Hive Metastore service.
Start your metastore database server.
For PostgreSQL:
psql -U postgres -f $Path_to_PostgreSQL_Script $hive_dbname
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 -hiveconf hive.metastore.uris=" " >$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;