hadoop - SUM或COUNT的HiveQL查询不起作用

标签 hadoop hive hiveql

目前,只有简单的SELECT查询实际上正在返回数据。所有其他查询仅在显示以下消息后停止处理:

Logging initialized using configuration in jar:file:/usr/local/hive/lib/hive-common-2.1.0.jar!/hive-log4j2.properties Async: true
WARNING: Hive-on-MR is deprecated in Hive 2 and may not be available in the future versions. Consider using a different execution engine (i.e. tez, spark) or using Hive 1.X releases.
Query ID = root_20161004163653_24333e2f-b221-4639-9b6c-69161aa5a41d
Total jobs = 1
Launching Job 1 out of 1
Number of reduce tasks determined at compile time: 1
In order to change the average load for a reducer (in bytes):
  set hive.exec.reducers.bytes.per.reducer=<number>
In order to limit the maximum number of reducers:
  set hive.exec.reducers.max=<number>
In order to set a constant number of reducers:
  set mapreduce.job.reduces=<number>

最佳答案

简单的SELECT查询效果很好,原因是它们不会在后台触发Map reduce作业。

Hive-on-MR已在Hive 2版本中弃用,而其他更现代,更积极开发的执行引擎已经投入生产了一段时间。在将来的2.X版本中可能会删除该支持。如果您想继续使用MR,请考虑使用其他执行引擎(例如spark,tez)或使用Hive 1.X版本。

检查link,您可能必须使用spark或Tez作为执行引擎,或者使用旧版本的Hive。

关于hadoop - SUM或COUNT的HiveQL查询不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39860487/

相关文章:

python - 如何通过识别python Hadoop中的键来处理Mapreduce

hadoop - 关于 MR inputsplit

sql - 在 Hive 中获取查询输出的模式

hive - hive explode/横向查看多个阵列

apache-spark - emrfs同步和导入卡住了,无法正常工作

security - 如何实现基于多用户的cdh hadoop env?

json - 使用JSON Serde在Hive中加载JSON文件

sql - 使用 Filter 参数创建 View

java - 将配置单元外部表更改为同一数据库中的内部表也会删除另一个表中的数据

sql - Hive中通过复杂键计算两个表之间的表差异