Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/video/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
配置单元查询抛出“;代码2来自org.apache.hadoop.hive.ql.exec.tez.TezTask“;查询具有GROUP BY CLUSE时出现异常_Hive_Hiveql_Apache Tez - Fatal编程技术网

配置单元查询抛出“;代码2来自org.apache.hadoop.hive.ql.exec.tez.TezTask“;查询具有GROUP BY CLUSE时出现异常

配置单元查询抛出“;代码2来自org.apache.hadoop.hive.ql.exec.tez.TezTask“;查询具有GROUP BY CLUSE时出现异常,hive,hiveql,apache-tez,Hive,Hiveql,Apache Tez,我在HDP 3.1.4上有Hive+LLAP 配置单元和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

我在HDP 3.1.4上有Hive+LLAP

配置单元和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
以下查询正常运行:

select count(*) from balance;
但在以下查询中使用group by表达式时:

select count(*),jobdate from balance group by jobdate;
我 我尝试了许多配置,但引发了此长异常:

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**

Ambari配置页面中的sethive.tez.container.size有两个部分。其中一个出现在设置选项卡中,另一个与LLAP相关的出现在高级蜂巢互动站点高级选项卡中。我尝试使用hive.tez.container.size设置选项卡的值,而不是高级hive交互站点部分。最后,我设置了以下配置并解决了错误:

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;

我尝试了许多基于以下参考的配置: