与linux交互命令
格式
在linux的命令前加上!(英文感叹号),以;(英文分号结尾)
操作实例
!ls;!pwd;
hive> !ls;
app
derby.log
hadoop-2.7.2.tar.gz
jdk-8u73-linux-x64.tar.gz
metastore_db
t.sql
hive> !pwd;
/home/hadoop
与hdfs交互命令
格式
操作实例
dfs -mkdir /hive123;
hive> dfs -ls /;
Found 5 items
drwxr-xr-x - hadoop supergroup 0 2016-08-13 00:42 /temp.har
drwxr-xr-x - hadoop supergroup 0 2016-08-19 22:52 /testdata
drwx------ - hadoop supergroup 0 2016-08-27 04:06 /tmp
drwxr-xr-x - hadoop supergroup 0 2016-08-27 20:28 /user
drwxr-xr-x - hadoop supergroup 0 2016-04-14 22:19 /wc
hive> dfs -mkdir /hive123;
hive> dfs -ls /;
Found 6 items
drwxr-xr-x - hadoop supergroup 0 2016-09-01 19:55 /hive123
drwxr-xr-x - hadoop supergroup 0 2016-08-13 00:42 /temp.har
drwxr-xr-x - hadoop supergroup 0 2016-08-19 22:52 /testdata
drwx------ - hadoop supergroup 0 2016-08-27 04:06 /tmp
drwxr-xr-x - hadoop supergroup 0 2016-08-27 20:28 /user
drwxr-xr-x - hadoop supergroup 0 2016-04-14 22:19 /wc
hive>