...
Beeline Example
No Format |
---|
% bin/beeline
Hive version 0.11.0-SNAPSHOT by Apache
beeline> !connect jdbc:hive2://localhost:10000 scott tiger
!connect jdbc:hive2://localhost:10000 scott tiger
Connecting to jdbc:hive2://localhost:10000
Connected to: Hive (version 0.10.0)
Driver: Hive (version 0.10.0-SNAPSHOT)
Transaction isolation: TRANSACTION_REPEATABLE_READ
0: jdbc:hive2://localhost:10000> show tables;
show tables;
+-------------------+
| tab_name |
+-------------------+
| primitives |
| src |
| src1 |
| src_json |
| src_sequencefile |
| src_thrift |
| srcbucket |
| srcbucket2 |
| srcpart |
+-------------------+
9 rows selected (1.079 seconds)
|
Using commandline arguments to connect. This means you can find the command with connection string from your unix shell history. Note that this is not reccomended if you are using password based authentication, as it would save the password as well in your shell history.
No Format |
---|
% beeline -u jdbc:hive2://localhost:10000/default -n scott -p tiger
Hive version 0.11.0-SNAPSHOT by Apache
Connecting to jdbc:hive2://localhost:10000/default |
Info | ||
---|---|---|
| ||
If you'd like to connect via NOSASL mode, you must specify the authentication mode explicitly: % bin/beeline |
...