hive on tez 执行任务报错

 

hive on tez,在执行任务的时候报错,这种情况原因是container资源被抢占或者是资源不足。而task最大的失败次数默认是4,am自己失败的最大重试次数默认是2次。

报错日志:

Vertex did not succeed due to OTHER_VERTEX_FAILURE, failedTasks:0 killedTasks:13
Vertex vertex_1588914175897_18178_1_00 [Map 7] killed/failed due to:OTHER_VERTEX_FAILURE, counters=Counters: 35, File System Counters, FILE_BYTES_READ=47800, FILE_BYTES_WRITTEN=1107572220, HDFS_BYTES_READ=745850999, HDFS_READ_OPS=60, HDFS_OP_OPEN=60, org.apache.tez.common.counters.TaskCounter, SPILLED_RECORDS=16203009, GC_TIME_MILLIS=3322, CPU_MILLISECONDS=239810, PHYSICAL_MEMORY_BYTES=17135828992, VIRTUAL_MEMORY_BYTES=32139993088, COMMITTED_HEAP_BYTES=17135828992, INPUT_RECORDS_PROCESSED=16203009, INPUT_SPLIT_LENGTH_BYTES=4733999156, OUTPUT_RECORDS=16203009, OUTPUT_BYTES=2399220587, OUTPUT_BYTES_WITH_OVERHEAD=2442634582, OUTPUT_BYTES_PHYSICAL=1107524420, ADDITIONAL_SPILLS_BYTES_WRITTEN=0, ADDITIONAL_SPILLS_BYTES_READ=0, ADDITIONAL_SPILL_COUNT=0, SHUFFLE_CHUNK_COUNT=5, HIVE, DESERIALIZE_ERRORS=0, RECORDS_IN_Map_7=16203009, RECORDS_OUT_INTERMEDIATE_Map_7=16203009, TaskCounter_Map_7_INPUT_company_baseinfo_complex, INPUT_RECORDS_PROCESSED=16203009, INPUT_SPLIT_LENGTH_BYTES=4733999156, TaskCounter_Map_7_OUTPUT_Reducer_8, ADDITIONAL_SPILLS_BYTES_READ=0, ADDITIONAL_SPILLS_BYTES_WRITTEN=0, ADDITIONAL_SPILL_COUNT=0, OUTPUT_BYTES=2399220587, OUTPUT_BYTES_PHYSICAL=1107524420, OUTPUT_BYTES_WITH_OVERHEAD=2442634582, OUTPUT_RECORDS=16203009, SHUFFLE_CHUNK_COUNT=5, SPILLED_RECORDS=16203009, vertexStats=firstTaskStartTime=1589836372219, firstTasksToStart=[ task_1588914175897_18178_1_00_000012,task_1588914175897_18178_1_00_000013,task_1588914175897_18178_1_00_000010,task_1588914175897_18178_1_00_000011 ], lastTaskFinishTime=1589836672777, lastTasksToFinish=[ task_1588914175897_18178_1_00_000008,task_1588914175897_18178_1_00_000009,task_1588914175897_18178_1_00_000006,task_1588914175897_18178_1_00_000007 ], minTaskDuration=38304, maxTaskDuration=61170, avgTaskDuration=49326.8, numSuccessfulTasks=5, shortestDurationTasks=[ task_1588914175897_18178_1_00_000001 ], longestDurationTasks=[ task_1588914175897_18178_1_00_000000 ], vertexTaskStats={numFailedTaskAttempts=0, numKilledTaskAttempts=0, numCompletedTasks=18, numSucceededTasks=5, numKilledTasks=13, numFailedTasks=0}
2020-05-19 05:17:52,787 [INFO] [Dispatcher thread {Central}] |impl.VertexImpl|: vertex_1588914175897_18178_1_00 [Map 7] transitioned from TERMINATING to KILLED due to event V_TASK_COMPLETED
2020-05-19 05:17:52,788 [INFO] [Dispatcher thread {Central}] |history.HistoryEventHandler|: [HISTORY][DAG:dag_1588914175897_18178_1][Event:CONTAINER_STOPPED]: containerId=container_e57_1588914175897_18178_02_000007, stoppedTime=1589836672788, exitStatus=-1000
2020-05-19 05:17:52,789 [INFO] [Dispatcher thread {Central}] |impl.DAGImpl|: Vertex vertex_1588914175897_18178_1_04 [Reducer 2] completed., numCompletedVertices=7, numSuccessfulVertices=2, numFailedVertices=1, numKilledVertices=4, numVertices=8
2020-05-19 05:17:52,789 [INFO] [Dispatcher thread {Central}] |impl.DAGImpl|: Checking vertices for DAG completion, numCompletedVertices=7, numSuccessfulVertices=2, numFailedVertices=1, numKilledVertices=4, numVertices=8, commitInProgress=0, terminationCause=VERTEX_FAILURE
2020-05-19 05:17:52,789 [INFO] [Dispatcher thread {Central}] |node.AMNodeImpl|: Attempt failed on node: storm-node-20:45454 TA: attempt_1588914175897_18178_1_00_000002_0 failed: false container: container_e57_1588914175897_18178_02_000007 numFailedTAs: 0
2020-05-19 05:17:52,789 [INFO] [Dispatcher thread {Central}] |history.HistoryEventHandler|: [HISTORY][DAG:dag_1588914175897_18178_1][Event:CONTAINER_STOPPED]: containerId=container_e57_1588914175897_18178_02_000004, stoppedTime=1589836672789, exitStatus=-1000
2020-05-19 05:17:52,789 [INFO] [Dispatcher thread {Central}] |node.AMNodeImpl|: Attempt failed on node: storm-node-15:45454 TA: attempt_1588914175897_18178_1_00_000006_0 failed: false container: container_e57_1588914175897_18178_02_000004 numFailedTAs: 0
2020-05-19 05:17:52,789 [INFO] [Dispatcher thread {Central}] |history.HistoryEventHandler|: [HISTORY][DAG:dag_1588914175897_18178_1][Event:CONTAINER_STOPPED]: containerId=container_e57_1588914175897_18178_02_000005, stoppedTime=1589836672789, exitStatus=-1000
2020-05-19 05:17:52,789 [INFO] [Dispatcher thread {Central}] |node.AMNodeImpl|: Attempt failed on node: storm-node-16:45454 TA: attempt_1588914175897_18178_1_00_000007_0 failed: false container: container_e57_1588914175897_18178_02_000005 numFailedTAs: 0
2020-05-19 05:17:52,789 [INFO] [Dispatcher thread {Central}] |history.HistoryEventHandler|: [HISTORY][DAG:dag_1588914175897_18178_1][Event:CONTAINER_STOPPED]: containerId=container_e57_1588914175897_18178_02_000006, stoppedTime=1589836672789, exitStatus=-1000
2020-05-19 05:17:52,789 [INFO] [Dispatcher thread {Central}] |node.AMNodeImpl|: Attempt failed on node: storm-node-12:45454 TA: attempt_1588914175897_18178_1_00_000008_0 failed: false container: container_e57_1588914175897_18178_02_000006 numFailedTAs: 0
2020-05-19 05:17:52,789 [INFO] [Dispatcher thread {Central}] |history.HistoryEventHandler|: [HISTORY][DAG:dag_1588914175897_18178_1][Event:CONTAINER_STOPPED]: containerId=container_e57_1588914175897_18178_02_000009, stoppedTime=1589836672789, exitStatus=-1000
2020-05-19 05:17:52,789 [INFO] [Dispatcher thread {Central}] |node.AMNodeImpl|: Attempt failed on node: storm-node-16:45454 TA: attempt_1588914175897_18178_1_00_000009_0 failed: false container: container_e57_1588914175897_18178_02_000009 numFailedTAs: 0
2020-05-19 05:17:52,789 [INFO] [Dispatcher thread {Central}] |history.HistoryEventHandler|: [HISTORY][DAG:dag_1588914175897_18178_1][Event:CONTAINER_STOPPED]: containerId=container_e57_1588914175897_18178_02_000008, stoppedTime=1589836672789, exitStatus=-1000
2020-05-19 05:17:52,789 [INFO] [Dispatcher thread {Central}] |impl.DAGImpl|: Vertex vertex_1588914175897_18178_1_00 [Map 7] completed., numCompletedVertices=8, numSuccessfulVertices=2, numFailedVertices=1, numKilledVertices=5, numVertices=8
2020-05-19 05:17:52,789 [INFO] [Dispatcher thread {Central}] |impl.DAGImpl|: Checking vertices for DAG completion, numCompletedVertices=8, numSuccessfulVertices=2, numFailedVertices=1, numKilledVertices=5, numVertices=8, commitInProgress=0, terminationCause=VERTEX_FAILURE
2020-05-19 05:17:52,789 [INFO] [Dispatcher thread {Central}] |impl.DAGImpl|: DAG did not succeed due to VERTEX_FAILURE. failedVertices:1 killedVertices:5
2020-05-19 05:17:52,795 [INFO] [IPC Server handler 2 on 33236] |app.TaskAttemptListenerImpTezDag|: Container with id: container_e57_1588914175897_18178_02_000008 is valid, but no longer registered, and will be killed
2020-05-19 05:17:52,804 [WARN] [IPC Server handler 18 on 33236] |app.TaskAttemptListenerImpTezDag|: Received task heartbeat from unknown container with id: container_e57_1588914175897_18178_02_000006, asking it to die
2020-05-19 05:17:52,854 [WARN] [IPC Server handler 8 on 33236] |app.TaskAttemptListenerImpTezDag|: Received task heartbeat from unknown container with id: container_e57_1588914175897_18178_02_000005, asking it to die
2020-05-19 05:17:52,857 [WARN] [IPC Server handler 4 on 33236] |app.TaskAttemptListenerImpTezDag|: Received task heartbeat from unknown container with id: container_e57_1588914175897_18178_02_000007, asking it to die
2020-05-19 05:17:52,890 [WARN] [IPC Server handler 0 on 33236] |app.TaskAttemptListenerImpTezDag|: Received task heartbeat from unknown container with id: container_e57_1588914175897_18178_02_000004, asking it to die
2020-05-19 05:17:52,954 [WARN] [IPC Server handler 13 on 33236] |app.TaskAttemptListenerImpTezDag|: Received task heartbeat from unknown container with id: container_e57_1588914175897_18178_02_000009, asking it to die
2020-05-19 05:17:53,007 [INFO] [Dispatcher thread {Central}] |recovery.RecoveryService|: DAG completed, dagId=dag_1588914175897_18178_1, queueSize=0
2020-05-19 05:17:53,096 [INFO] [Dispatcher thread {Central}] |history.HistoryEventHandler|: [HISTORY][DAG:dag_1588914175897_18178_1][Event:DAG_FINISHED]: dagId=dag_1588914175897_18178_1, startTime=1589836371531, finishTime=1589836672789, timeTaken=301258, status=FAILED, diagnostics=Vertex failed, vertexName=Reducer 8, vertexId=vertex_1588914175897_18178_1_01, diagnostics=[Exception in VertexManager, vertex:vertex_1588914175897_18178_1_01 [Reducer 8],org.apache.tez.dag.api.TezUncheckedException: setParallelism cannot be called after scheduling tasks. Vertex: vertex_1588914175897_18178_1_01 [Reducer 8]
	at org.apache.tez.dag.app.dag.impl.VertexImpl.setParallelism(VertexImpl.java:1737)
	at org.apache.tez.dag.app.dag.impl.VertexImpl.reconfigureVertex(VertexImpl.java:1653)
	at org.apache.tez.dag.app.dag.impl.VertexManager$VertexManagerPluginContextImpl.reconfigureVertex(VertexManager.java:186)
	at org.apache.tez.dag.library.vertexmanager.ShuffleVertexManager.determineParallelismAndApply(ShuffleVertexManager.java:654)
	at org.apache.tez.dag.library.vertexmanager.ShuffleVertexManager.schedulePendingTasks(ShuffleVertexManager.java:670)
	at org.apache.tez.dag.library.vertexmanager.ShuffleVertexManager.schedulePendingTasks(ShuffleVertexManager.java:776)
	at org.apache.tez.dag.library.vertexmanager.ShuffleVertexManager.onSourceTaskCompleted(ShuffleVertexManager.java:500)
	at org.apache.tez.dag.app.dag.impl.VertexManager$VertexManagerEventSourceTaskCompleted.invoke(VertexManager.java:603)
	at org.apache.tez.dag.app.dag.impl.VertexManager$VertexManagerEvent$1.run(VertexManager.java:658)
	at org.apache.tez.dag.app.dag.impl.VertexManager$VertexManagerEvent$1.run(VertexManager.java:653)
	at java.security.AccessController.doPrivileged(Native Method)
	at javax.security.auth.Subject.doAs(Subject.java:422)
	at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1869)
	at org.apache.tez.dag.app.dag.impl.VertexManager$VertexManagerEvent.call(VertexManager.java:653)
	at org.apache.tez.dag.app.dag.impl.VertexManager$VertexManagerEvent.call(VertexManager.java:642)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)
, Vertex did not succeed due to AM_USERCODE_FAILURE, failedTasks:0 killedTasks:398, Vertex vertex_1588914175897_18178_1_01 [Reducer 8] killed/failed due to:AM_USERCODE_FAILURE]
Vertex killed, vertexName=Reducer 3, vertexId=vertex_1588914175897_18178_1_05, diagnostics=[Vertex received Kill while in RUNNING state., Vertex did not succeed due to OTHER_VERTEX_FAILURE, failedTasks:0 killedTasks:172, Vertex vertex_1588914175897_18178_1_05 [Reducer 3] killed/failed due to:OTHER_VERTEX_FAILURE]
Vertex killed, vertexName=Reducer 5, vertexId=vertex_1588914175897_18178_1_07, diagnostics=[Vertex received Kill while in RUNNING state., Vertex did not succeed due to OTHER_VERTEX_FAILURE, failedTasks:0 killedTasks:220, Vertex vertex_1588914175897_18178_1_07 [Reducer 5] killed/failed due to:OTHER_VERTEX_FAILURE]
Vertex killed, vertexName=Reducer 4, vertexId=vertex_1588914175897_18178_1_06, diagnostics=[Vertex received Kill while in RUNNING state., Vertex did not succeed due to OTHER_VERTEX_FAILURE, failedTasks:0 killedTasks:284, Vertex vertex_1588914175897_18178_1_06 [Reducer 4] killed/failed due to:OTHER_VERTEX_FAILURE]
Vertex killed, vertexName=Reducer 2, vertexId=vertex_1588914175897_18178_1_04, diagnostics=[Vertex received Kill while in RUNNING state., Vertex did not succeed due to OTHER_VERTEX_FAILURE, failedTasks:0 killedTasks:20, Vertex vertex_1588914175897_18178_1_04 [Reducer 2] killed/failed due to:OTHER_VERTEX_FAILURE]
Vertex killed, vertexName=Map 7, vertexId=vertex_1588914175897_18178_1_00, diagnostics=[Vertex received Kill while in RUNNING state., Vertex did not succeed due to OTHER_VERTEX_FAILURE, failedTasks:0 killedTasks:13, Vertex vertex_1588914175897_18178_1_00 [Map 7] killed/failed due to:OTHER_VERTEX_FAILURE]
DAG did not succeed due to VERTEX_FAILURE. failedVertices:1 killedVertices:5, counters=Counters: 68, org.apache.tez.common.counters.DAGCounter, NUM_KILLED_TASKS=33, NUM_SUCCEEDED_TASKS=17, TOTAL_LAUNCHED_TASKS=22, DATA_LOCAL_TASKS=3, RACK_LOCAL_TASKS=8, AM_CPU_MILLISECONDS=21690, AM_GC_TIME_MILLIS=29, File System Counters, FILE_BYTES_READ=92824, FILE_BYTES_WRITTEN=1874380129, HDFS_BYTES_READ=1444697496, HDFS_READ_OPS=145, HDFS_OP_OPEN=145, org.apache.tez.common.counters.TaskCounter, SPILLED_RECORDS=57624814, GC_TIME_MILLIS=5403, CPU_MILLISECONDS=521160, PHYSICAL_MEMORY_BYTES=49465524224, VIRTUAL_MEMORY_BYTES=109211656192, COMMITTED_HEAP_BYTES=49465524224, INPUT_RECORDS_PROCESSED=57624814, INPUT_SPLIT_LENGTH_BYTES=11099796036, OUTPUT_RECORDS=57624814, OUTPUT_BYTES=3583907214, OUTPUT_BYTES_WITH_OVERHEAD=3710166893, OUTPUT_BYTES_PHYSICAL=1874287305, ADDITIONAL_SPILLS_BYTES_WRITTEN=0, ADDITIONAL_SPILLS_BYTES_READ=0, ADDITIONAL_SPILL_COUNT=0, SHUFFLE_CHUNK_COUNT=17, HIVE, DESERIALIZE_ERRORS=0, RECORDS_IN_Map_1=41418454, RECORDS_IN_Map_6=3351, RECORDS_IN_Map_7=16203009, RECORDS_OUT_INTERMEDIATE_Map_1=41418454, RECORDS_OUT_INTERMEDIATE_Map_6=3351, RECORDS_OUT_INTERMEDIATE_Map_7=16203009, TaskCounter_Map_1_INPUT_domainweb_complex, INPUT_RECORDS_PROCESSED=41418454, INPUT_SPLIT_LENGTH_BYTES=6365505145, TaskCounter_Map_1_OUTPUT_Reducer_2, ADDITIONAL_SPILLS_BYTES_READ=0, ADDITIONAL_SPILLS_BYTES_WRITTEN=0, ADDITIONAL_SPILL_COUNT=0, OUTPUT_BYTES=1184494315, OUTPUT_BYTES_PHYSICAL=766708084, OUTPUT_BYTES_WITH_OVERHEAD=1267347103, OUTPUT_RECORDS=41418454, SHUFFLE_CHUNK_COUNT=11, SPILLED_RECORDS=41418454, TaskCounter_Map_6_INPUT_t1, INPUT_RECORDS_PROCESSED=3351, INPUT_SPLIT_LENGTH_BYTES=291735, TaskCounter_Map_6_OUTPUT_Reducer_2, ADDITIONAL_SPILLS_BYTES_READ=0, ADDITIONAL_SPILLS_BYTES_WRITTEN=0, ADDITIONAL_SPILL_COUNT=0, OUTPUT_BYTES=192312, OUTPUT_BYTES_PHYSICAL=54801, OUTPUT_BYTES_WITH_OVERHEAD=185208, OUTPUT_RECORDS=3351, SHUFFLE_CHUNK_COUNT=1, SPILLED_RECORDS=3351, TaskCounter_Map_7_INPUT_company_baseinfo_complex, INPUT_RECORDS_PROCESSED=16203009, INPUT_SPLIT_LENGTH_BYTES=4733999156, TaskCounter_Map_7_OUTPUT_Reducer_8, ADDITIONAL_SPILLS_BYTES_READ=0, ADDITIONAL_SPILLS_BYTES_WRITTEN=0, ADDITIONAL_SPILL_COUNT=0, OUTPUT_BYTES=2399220587, OUTPUT_BYTES_PHYSICAL=1107524420, OUTPUT_BYTES_WITH_OVERHEAD=2442634582, OUTPUT_RECORDS=16203009, SHUFFLE_CHUNK_COUNT=5, SPILLED_RECORDS=16203009
2020-05-19 05:17:53,096 [INFO] [Dispatcher thread {Central}] |impl.VertexImpl|: Ignoring multiple aborts for vertex: vertex_1588914175897_18178_1_05 [Reducer 3]
2020-05-19 05:17:53,096 [INFO] [Dispatcher thread {Central}] |impl.VertexImpl|: Ignoring multiple aborts for vertex: vertex_1588914175897_18178_1_04 [Reducer 2]
2020-05-19 05:17:53,096 [INFO] [Dispatcher thread {Central}] |impl.VertexImpl|: Ignoring multiple aborts for vertex: vertex_1588914175897_18178_1_07 [Reducer 5]
2020-05-19 05:17:53,096 [INFO] [Dispatcher thread {Central}] |impl.VertexImpl|: Ignoring multiple aborts for vertex: vertex_1588914175897_18178_1_06 [Reducer 4]
2020-05-19 05:17:53,096 [INFO] [Dispatcher thread {Central}] |impl.VertexImpl|: Ignoring multiple aborts for vertex: vertex_1588914175897_18178_1_01 [Reducer 8]
2020-05-19 05:17:53,096 [INFO] [Dispatcher thread {Central}] |impl.VertexImpl|: Ignoring multiple aborts for vertex: vertex_1588914175897_18178_1_00 [Map 7]
2020-05-19 05:17:53,097 [INFO] [Dispatcher thread {Central}] |impl.DAGImpl|: DAG: dag_1588914175897_18178_1 finished with state: FAILED
2020-05-19 05:17:53,097 [INFO] [Dispatcher thread {Central}] |impl.DAGImpl|: dag_1588914175897_18178_1 transitioned from TERMINATING to FAILED due to event DAG_VERTEX_COMPLETED

 

分析:

[Reducer 2] transitioned from TERMINATING to KILLED due to event V_TASK_COMPLETED  reduce和map被Kill了好几次。
失败的原因是container被高优先级的任务抢占了。而task最大的失败次数默认是4。当集群上的任务比较多时,比较容易出现这个问题。

解决方案:

命令行修改默认值

set tez.am.task.max.failed.attempts=10;
set tez.am.max.app.attempts=5;

1. 参数:set tez.am.max.app.attempts=5;   表达含义:am自己失败的最大重试次数,默认是2次。这里并不是am自己挂了,只是因为一些系统原因导致失联了,所以这里用到这个设置;

2. 参数:set tez.am.task.max.failed.attempts=10;  表达含义:任务中attempts失败的最大重试次数,默认跟yarn一样是4次 ,在不稳定集群可以设置大一点,这里设置为10;

3. 参数:Tez Container Size  表达含义:还有一个原因可能是container设置的内存太小,默认本来是1G,改为4G以上基本没啥问题了 (目前生产集群为 5120MB)。在Hive配置文件修改 ;    (本次任务报错非此参数原因,故未做改动)

 

 

 

一些TEZ的比较重要参数:

part1:

一、AM、Container大小设置
1、tez.am.resource.memory.mb  #设置 tez AM容器内存
  默认值:1024  
  配置文件:tez-site.xml
  建议:不小于或者等于yarn.scheduler.minimum-allocation-mb值。
  

2、hive.tez.container.size  #设置 tez container内存
  默认值:-1
  默认情况下,Tez将生成一个mapper大小的容器。这可以用来覆盖默认值。
  配置文件:hive-site-xml
  建议:不小于或者是yarn.scheduler.minimum-allocation-mb的倍数
  
二、AM、Container JVM参数设置
1、tez.am.launch.cmd-opts  #设置 AM jvm,启动TEZ任务进程期间提供的命令行选项。
  默认值:-XX:+PrintGCDetails -verbose:gc -XX:+PrintGCTimeStamps -XX:+UseNUMA -XX:+UseParallelGC(用于GC),默认的大小:80%*tez.am.resource.memory.mb
  配置文件:tez-site.xml
  建议:不要在这些启动选项中设置任何xmx或xms,以便tez可以自动确定它们。
  

2、hive.tez.java.ops  #设置 container jvm
  默认值:Hortonworks建议“–server –Djava.net.preferIPv4Stack=true–XX:NewRatio=8 –XX:+UseNUMA –XX:UseG1G”,默认大小:80%*hive.tez.container.size
  说明:在hive 2.x的官方文档中没有找到这个参数。看有些博客里面有这个值。
  配置文件:hive-site.xml

3、tez.container.max.java.heap.fraction  #设置task/AM占用jvm内存大小的比例。
  默认值:0.8
  配置文件:tez-site.xml
  说明:这个值按具体需要调整,当内存不足时,一般都要调小。

三、Hive内存Map Join参数设置
1、tez.runtime.io.sort.mb  #设置输出排序内存大小
  默认值:100
  配置文件:tez-site.xml
  建议:40%*hive.tez.container.size,一般不超过2G
2、hive.auto.convert.join.noconditionaltask  #是否将多个mapjoin合并为一个
  默认值:true
  建议使用默认值。
  配置文件:hive-site.xml
3、hive.auto.convert.join.noconditionaltask.size  
  默认值:10000000  (10M)
  说明:这个参数使用的前提是hive.auto.convert.join.noconditionaltask值为true,多个mapjoin转换为1个时,所有小表的文件大小总和小于这个值,这个值只是限制输入的表文件的大小,并不代表实际mapjoin时hashtable的大小。 建议值:1/3* hive.tez.container.size
  配置文件:hive-site.xml
4、tez.runtime.unordered.output.buffer.size-mb  #如果不直接写入磁盘,使用的缓冲区大小
  默认值:100M
  建议:10%* hive.tez.container.size
  配置文件:tez-site.xml

5、tez.am.container.reuse.enabled  #容器重用
  默认值:true
  配置文件:tez-ste.xml

 

 

part2:

timeline server 配置 ,默认是org.apache.tez.dag.history.logging.ats.ATSHistoryLoggingService

tez.history.logging.service.class

jobhistory搭建的地址,需要独立的ui-war部署

tez.tez-ui.history-url.base

是否开启推测执行,默认是false,在出现最后一个任务很慢的情况下,建议把这个参数设置为true

tez.am.speculation.enabled

分配的内存,默认1024 ,出现内存不够时候,设置更大点

tez.task.resource.memory.mb

分配的vcores 默认是1  ,一般不需要改

tez.task.resource.cpu.vcores

日志级别,默认info

tez.task.log.level

启动的JVM参数 ,默认-XX:+PrintGCDetails -verbose:gc -XX:+PrintGCTimeStamps -XX:+UseNUMA -XX:+UseParallelGC

tez.task.launch.cmd-opts

在yarn中的默认执行队列

tez.queue.name

依赖的hadoop相关包

tez.lib.uris.classpath

运行依赖的自身包,这个参数设置比较麻烦,很容易出错

tez.lib.uris

自己定义的UDF 相关包

tez.aux.uris

基于yarn提供的内存,分配给java进程的百分比,默认是0.8,具体大小取决于mapreduce.reduce.memory.mb和mapreduce.map.memory.mb。一般不用变即可

tez.container.max.java.heap.fraction

任务中attempts失败的最大重试次数,默认跟yarn一样是4次 ,在不稳定集群可以设置大一点

tez.am.task.max.failed.attempts

am自己失败的最大重试次数,默认是2次。这里并不是说am自己挂了,只是因为一些系统原因导致失联了

tez.am.max.app.attempts

am分配的cpu个数,默认1

tez.am.resource.cpu.vcores

am分配的内存大小,默认1024

tez.am.resource.memory.mb

任务进程重用是否开启,默认是true

tez.am.container.reuse.enabled

更多详细的配置 (官方文档):

https://tez.apache.org/releases/0.8.4/tez-api-javadocs/configs/TezConfiguration.html

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章