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

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