简体   繁体   English

Hive query throw “code 2 from org.apache.hadoop.hive.ql.exec.tez.TezTask” exception when query has GROUP BY cluase

[英]Hive query throw “code 2 from org.apache.hadoop.hive.ql.exec.tez.TezTask” exception when query has GROUP BY cluase

I have Hive + LLAP on HDP 3.1.4我在 HDP 3.1.4 上有 Hive + LLAP

Hive and Tez Config is: Hive 和 Tez 配置是:

yarn.nodemanager.resource.memory-mb = 40960
yarn.scheduler.minimum-allocation-mb = 1024
yarn.scheduler.maximum-allocation-mb = 40960
hive.tez.container.size = 4096
num_llap_nodes=4
hive.llap.daemon.num.executors=8
hive.llap.daemon.yarn.container.mb = 35840
llap_headroom_space=2048
llap_heap_size=32768
hive.llap.io.memory.size=1024
tez.am.resource.memory.mb=4096
hive.tez.java.opts=-server -Djava.net.preferIPv4Stack=true -XX:NewRatio=8 -XX:+UseNUMA -XX:+UseG1GC -XX:+ResizeTLAB -XX:+PrintGCDetails -verbose:gc -XX:+PrintGCTimeStamps **-Xmx3276m**
tez.runtime.io.sort.mb= 1638
tez.runtime.unordered.output.buffer.size-mb=409

The following query runs properly:以下查询正常运行:

select count(*) from balance;

but when use group by expression in the following query:但是在以下查询中使用 group by 表达式时:

select count(*),jobdate from balance group by jobdate;

I I've tried many configurations but this long exception is thrown:我已经尝试了很多配置,但是抛出了这个很长的异常:

ERROR: Error while processing statement: **FAILED: Execution Error, 
    return code 2 from org.apache.hadoop.hive.ql.exec.tez.TezTask.** 
    Vertex failed, vertexName=Map 1, 
    vertexId=vertex_1617520101397_0014_1_00, diagnostics=[Task 
    failed, taskId=task_1617520101397_0014_1_00_000013, 
    diagnostics=[TaskAttempt 0 failed, **info=[Error: Error while 
    running task ( failure ) : java.lang.NoClassDefFoundError: Could 
    not initialize class 
    org.apache.tez.runtime.library.api.TezRuntimeConfiguration**    at 

    **BLABLA**
        at java.lang.Thread.run(Thread.java:748) ]], Task failed, 
    taskId=task_1617520101397_0014_1_00_000006, 
    diagnostics=[TaskAttempt 0 failed, info=[Error: Error while 
    running task ( failure ) : java.lang.NoClassDefFoundError: Could 
    not initialize class 
    org.apache.tez.runtime.library.api.TezRuntimeConfiguration  at 
        at java.lang.Thread.run(Thread.java:748) ]], Task failed, 
    taskId=task_1617520101397_0014_1_00_000005, 
    diagnostics=[TaskAttempt 0 failed, info=[Error: Error while 
    running task ( failure ) : java.lang.NoClassDefFoundError: Could 
    not initialize class 
    org.apache.tez.runtime.library.api.TezRuntimeConfiguration  at 
    org.apache.tez.runtime.library.output.OrderedPartitionedKVOutput.start(OrderedPartitionedKVOutput.java:111) 
    java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) 
        at java.lang.Thread.run(Thread.java:748) ]], **Vertex did not 
    succeed due to OWN_TASK_FAILURE, failedTasks:9 killedTasks:31761, 
    Vertex vertex_1617520101397_0014_1_00 [Map 1] killed/failed due 
    to:OWN_TASK_FAILURE]Vertex killed, vertexName=Reducer 2, 
    vertexId=vertex_1617520101397_0014_1_01, diagnostics=[Vertex 
    received Kill while in RUNNING state., Vertex did not succeed due 
    to OTHER_VERTEX_FAILURE, failedTasks:0 killedTasks:18, Vertex 
    vertex_1617520101397_0014_1_01 [Reducer 2] killed/failed due 
    to:OTHER_VERTEX_FAILURE]DAG did not succeed due to 
    VERTEX_FAILURE. failedVertices:1 killedVertices:1 Error Code: 2**

There are two sections for set hive.tez.container.size in Ambari Hive Config page.在 Ambari Hive 配置页面中有两个部分用于设置hive.tez.container.size One of them appears in the SETTINGS tab and the other that has related to LLAP goes under the Advanced hive-interactive-site in the ADVANCED tab.其中一个出现在SETTINGS选项卡中,另一个与 LLAP 相关的位于ADVANCED选项卡中的Advanced hive-interactive-site下。 I was trying with hive.tez.container.size value the SETTINGS tab instead of Advanced hive-interactive-site section.我正在尝试使用hive.tez.container.size值设置选项卡而不是高级配置单元交互站点部分。 Finally, I set the following configs and the error solved:最后,我设置了以下配置并解决了错误:

set hive.tez.container.size=10240;
set hive.tez.java.opts=-Xmx9216m;
set tez.runtime.io.sort.mb=3072;
set tez.runtime.unordered.output.buffer.size-mb=1024;

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Hive 作业失败,来自 org.apache.hadoop.hive.ql.exec.tez.TezTask 和查询性能的返回代码为 1 - Hive Job failed with return code 1 from org.apache.hadoop.hive.ql.exec.tez.TezTask and Query Performance 配置单元查询因错误“执行错误,从org.apache.hadoop.hive.ql.exe返回代码2”而停止 - Hive query stops with Error “Execution Error, return code 2 from org.apache.hadoop.hive.ql.exe” 来自 org.apache.hadoop.hive.ql.exec.mapredtask 的配置单元执行错误返回代码 2 失败 - hive failed execution error return code 2 from org.apache.hadoop.hive.ql.exec.mapredtask 什么是 Hive:从 org.apache.hadoop.hive.ql.exec.MapRedTask 返回代码 2 - What is Hive: Return Code 2 from org.apache.hadoop.hive.ql.exec.MapRedTask Hive Error on windows - return code 2 from org.apache.hadoop.hive.ql.exec.mr.MapRedTask - Hive Error on windows - return code 2 from org.apache.hadoop.hive.ql.exec.mr.MapRedTask HIVE 执行错误,从 org.apache.hadoop.Z8A4AC216FB330DA3834DEql41 返回代码 1。 - HIVE Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask 查询 HiveServer2 时,Impyla 从 org.apache.hadoop.hive.ql.exec.mr.MapRedTask 返回代码 1 - Impyla return code 1 from org.apache.hadoop.hive.ql.exec.mr.MapRedTask when querying HiveServer2 执行错误,从 org.apache.hadoop.hive.ql.exec.FunctionTask 返回代码 1 - Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.FunctionTask 执行错误,从 org.apache.hadoop.hive.ql.exec.mr.MapRedTask 返回代码 2 - Execution Error, return code 2 from org.apache.hadoop.hive.ql.exec.mr.MapRedTask 失败:执行错误,从 org.apache.hadoop.hive.ql.exec.mr.MapredLocalTask​​ 返回代码 1 - FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.mr.MapredLocalTask
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM