hive_调优笔记一EXPLAIN解析
来源:互联网 发布:荒蛮故事 知乎 编辑:程序博客网 时间:2024/06/08 06:23
接触越多,越需要了解hive背后的理论知识以及底层的一些实现细节,会让用户更加高效地使用Hive
--摘于HIVE 编程指南.
----1
使用EXPLAIN
了解Hive是如何工作,第一个就是需要了解EXPLAIN功能
使用例子:
hive >explain select sum(id) from my;
OK
ABSTRACT SYNTAX TREE:
(TOK_QUERY (TOK_FROM (TOK_TABREF (TOK_TABNAME my))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (TOK_FUNCTION sum (TOK_TABLE_OR_COL id))))))
STAGE DEPENDENCIES:
Stage-1 is a root stage
Stage-0 is a root stage
STAGE PLANS:
Stage: Stage-1
Map Reduce --发生在job的map处理阶段过程
Alias -> Map Operator Tree:
my
TableScan --TableScan以my表作为输入
alias: my
Select Operator
expressions:
expr: id
type: int
outputColumnNames: id
Group By Operator
aggregations:
expr: sum(id) --group by Operator会应用到sum(id)
bucketGroup: false
mode: hash
outputColumnNames: _col0 ----为临时结果字段按规则起的临时字段名
Reduce Output Operator
sort order:
tag: -1
value expressions:
expr: _col0
type: bigint
Reduce Operator Tree: --reduce过程
Group By Operator
aggregations:
expr: sum(VALUE._col0)
bucketGroup: false
mode: mergepartial
outputColumnNames: _col0
Select Operator
expressions:
expr: _col0
type: bigint
outputColumnNames: _col0
File Output Operator --在reducer中科院看到File Output Operator,说明输出结果将是文本格式
compressed: false
GlobalTableId: 0
table:
input format: org.apache.hadoop.mapred.TextInputFormat
output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat ---说明输出结果将是文本格式,基于字符串的输出格式
Stage: Stage-0
Fetch Operator
limit: -1 --job没有limit ,因此是一个没有操作的阶段
解释:
1、TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE) 说明,虽然查询会将结果输出到控制台,但hive实际上会先将输出写入到一个临时文件。
2、Stage: Stage-1 一个Hive任务会包含一个或多个stage
0 0
- hive_调优笔记一EXPLAIN解析
- mysql explain命令解析
- mysql之explain解析
- mysql explain解析
- mysql explain解析
- mysql Explain使用解析
- mysql explain 参数解析
- hive_优化
- Hive_命令
- Hive_基础
- Mysql Explain 一
- 读《MySQL性能调优与架构设计》笔记之充分利用 Explain和Profiling
- 学习笔记--mysql explain
- mysql explain 工具,字段解析
- explain sql type字段解析
- MySQL EXPLAIN解析之id
- Mysql Explain 解析之Type
- MySql性能调优利器之Explain
- 毕设手机站,全新亮相
- Maven实战(六)依赖
- 轻松搞定面试中的二叉树题目
- Nyoj-20 吝啬的国度
- jquery easy ui表单和分页设计
- hive_调优笔记一EXPLAIN解析
- Algorithm学习笔记 --- Fibonacci(递归求解)
- sql笔试题(2)
- Monkey命令格式
- iOS7.1企业应用"无法安装应用程序 因为证书无效"的完美解决方案
- properties文件jar 路径
- Asterisk - dual servers Connecting two Asterisk servers
- Spring-jdbc-注解
- asp.net mvc3标识和事物