5. Validate the Installation

Use the following 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.

    2. Run sample commands.

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

  3. Start HiveServer2.

     /usr/lib/hive/bin/hiveserver2 >$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.

    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;


  • $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.

loading table of contents...