设为首页 加入收藏

TOP

Hive 常用交互命令
2019-05-15 01:02:07 】 浏览:145
Tags:Hive 常用 交互 命令

基本命令

[root@hadoop101 ~]# hive -h
Unrecognized option: -h
usage: hive
 -d,--define <key=value>          Variable subsitution to apply to hive
                                  commands. e.g. -d A=B or --define A=B
    --database <databasename>     Specify the database to use
 -e <quoted-query-string>         不进入hive的交互窗口执行sql语句
 -f <filename>                    执行脚本中sql语句
 -H,--help                        Print help information
    --hiveconf <property=value>   应用指定配置
    --hivevar <key=value>         Variable subsitution to apply to hive
                                  commands. e.g. --hivevar A=B
 -i <filename>                    Initialization SQL file
 -S,--silent                      Silent mode in interactive shell
 -v,--verbose                     Verbose mode (echo executed SQL to the
                                  console)

退出hive窗口

hive(default)>exit;
hive(default)>quit;

在新版的hive中没区别了,在以前的版本是有的:
exit:先隐性提交数据,再退出;
quit:不提交数据,退出;

在hive cli命令窗口中如何查看hdfs文件系统

hive(default)>dfs -ls /;

在hive cli命令窗口中如何查看本地文件系统

hive(default)>! ls /opt/module/datas;

查看在hive中输入的所有历史命令

  1. 进入到当前用户的根目录/root或/home/user
  2. 查看.hivehistory文件
】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
上一篇[ERROR] Terminal initialization.. 下一篇Exception in thread "main&..

最新文章

热门文章

Hot 文章

Python

C 语言

C++基础

大数据基础

linux编程基础

C/C++面试题目