6. Validate the Installation

Use these steps to validate your installation.

  1. Start Hive Metastore service.

     Login as $HIVE_USER
    nohup hive --service metastore>$HIVE_LOG_DIR/hive.out 2>$HIVE_LOG_DIR/hive.log & 
  2. Smoke Test Hive.

    1. Open Hive command line shell.

      hive
      

    2. Run sample commands.

      show databases;
      create table test(col1 int, col2 string);
      show tables;

  3. Start HiveServer2.

     /usr/lib/hive/bin/hiveserver2 -hiveconf hive.metastore.uris=" " >$HIVE_LOG_DIR/hiveserver2.out 2> $HIVE_LOG_DIR/hiveserver2.log & 
    

  4. Smoke Test HiveServer2.

    1. Open Beeline command line shell to interact with HiveServer2.

      /usr/lib/hive/bin/beeline
    2. Establish connection to server.

      !connect jdbc:hive2://$hive.server.full.hostname:10000 $HIVE_USER password org.apache.hive.jdbc.HiveDriver
      
    3. Run sample commands.

      show databases;
      create table test2(a int, b string);
      show tables;

loading table of contents...