hive的非交互模式
来源:互联网 发布:网络语8000是什么意思 编辑:程序博客网 时间:2024/05/19 15:42
在linux的终端执行:$HIVE_HOME/bin/hive 会进入交互模式;
$HIVE_HOME/bin/hive -e或者-f 是非交互模式
1、非交互模式执行HQL语句
$HIVE_HOME/bin/hive -e 'select * from movie limit 10'会显示mapreduce的进度,但不会进入hive的交互模式,最终现实查询结果
2、非交互模式执行HQL语句(-S静音模式)
$HIVE_HOME/bin/hive -S -e 'select * from movie limit 10'加入-S选项,不会显示mapreduce进度
[hadoop@gaoyuan hive-0.14]$ bin/hive -S -e 'select * from movie limit 10'SLF4J: Class path contains multiple SLF4J bindings.SLF4J: Found binding in [jar:file:/home/hadoop/hadoop-2.4.0/share/hadoop/common/lib/slf4j-log4j12-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]SLF4J: Found binding in [jar:file:/home/hadoop/hive-0.14/lib/hive-jdbc-0.14.0-SNAPSHOT-standalone.jar!/org/slf4j/impl/StaticLoggerBinder.class]SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]Error rolling back: Can't call rollback when autocommit=true1113382172063197110411095751161610611978771214588122118913751710140623
$HIVE_HOME/bin/hive -S -e 'select * from movie limit 10' > /gaoyuan/ouput.txt这个会把hive查询语句的执行结果导入output.txt文件中
4、不进入hive交互模式,执行hive脚本
$HIVE_HOME/bin/hive -f hiveScript.sql
也可以把输出结果存入一个文件中
$HIVE_HOME/bin/hive -f hiveScript.sql >> /home/username/output.txt
1 0
- hive的非交互模式
- hive交互模式和非交互模式
- hive交互模式
- Spark与Hive的交互
- Django shell非交互模式运行
- art fdisk非交互模式分区
- hive 交互
- hive的server模式
- hive的JDBC模式
- 【hive】hive与hbase数据交互的详解指南
- hive与依赖环境的交互
- hive与elasticsearch的数据交互
- MFC模式对话框与非模式对话框 消息处理顺序 与非模式对话框的焦点问题、显示、关闭以及交互问题
- bashrc bash_profle 的调用关系 交互型 非交互型
- shell命令执行hive脚本(hive交互,hive的shell编程)
- shell命令执行hive脚本(hive交互,hive的shell编程)
- shell命令执行hive脚本(hive交互,hive的shell编程)
- ftp脚本 实现非交互模式上传文件
- 1-11-2 - 求最大公约数(四个数,函数版)
- 隐藏tableview 下面多余的线条
- C# 取得本机进程启动命令行参数
- DDMS的使用、内存溢出的调试和模拟器的启动命令参数
- C库中重要字符串函数的简要分析及实例
- hive的非交互模式
- C# 异步多线程 sharpPcap 抓包
- 第十一周 项目2:求最大公约数(2)
- 1411061519-hd-Who's in the Middle
- ubuntu的目录结构
- 云计算设计模式(十三)——领导人选举模式
- 第十一周项目一 函数版星号图(3)
- Linux线程同步------屏障
- 第十一周 项目三:程序的多文件组织