Start Hive Beeline CLI

This code snippet provides example to start Hive Beeline CLI in Linux. Beeline is the successor of Hive CLI. In the shell scripts, the environment variable `$HIVE_HOME` is the home folder of Hive installation in the system. In a cluster environment, it usually refers to the Hive client installation on an edge server. Output: ``` $HIVE_HOME/bin/beeline -u jdbc:hive2:// Connecting to jdbc:hive2:// Hive Session ID = 65a40cd9-02ce-4965-93b6-cff9db461b70 Connected to: Apache Hive (version 3.1.3) Driver: Hive JDBC (version 3.1.3) Transaction isolation: TRANSACTION_REPEATABLE_READ Beeline version 3.1.3 by Apache Hive 0: jdbc:hive2://> ```

Kontext Kontext 0 265 0.25 index 8/20/2022

Code description

This code snippet provides example to start Hive Beeline CLI in Linux. Beeline is the successor of Hive CLI.

In the shell scripts, the environment variable $HIVE_HOME is the home folder of Hive installation in the system. In a cluster environment, it usually refers to the Hive client installation on an edge server. 

Output:

    $HIVE_HOME/bin/beeline -u jdbc:hive2://
    Connecting to jdbc:hive2://
    Hive Session ID = 65a40cd9-02ce-4965-93b6-cff9db461b70
    Connected to: Apache Hive (version 3.1.3)
    Driver: Hive JDBC (version 3.1.3)
    Transaction isolation: TRANSACTION_REPEATABLE_READ
    Beeline version 3.1.3 by Apache Hive
    0: jdbc:hive2://>  
    

Code snippet

    # Start beeline with default user
    $HIVE_HOME/bin/beeline -u jdbc:hive2://
    
    #Start beeline with anonymous user
    $HIVE_HOME/bin/beeline -u jdbc:hive2://localhost:10000
    
    #Start beeline with user name and password
    $HIVE_HOME/bin/beeline -u jdbc:hive2://localhost:10000 -n username -p password
hive shell

Join the Discussion

View or add your thoughts below

Comments