http://tez.apache.org/install.html 에서 tez-examples 를 돌려보면

($HADOOP_PREFIX/bin/hadoop jar tez-examples.jar orderedwordcount <input> <output>)


tez 예제를 돌려보면 실행성공


SLF4J: Class path contains multiple SLF4J bindings. SLF4J: Found binding in [jar:file:/opt/cloudera/parcels/CDH-5.5.1-1.cdh5.5.1.p0.11/jars/slf4j-log4j12-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class] SLF4J: Found binding in [jar:file:/naver/ncc/tez-jars/0.8.2/lib/slf4j-log4j12-1.7.10.jar!/org/slf4j/impl/StaticLoggerBinder.class] SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation. SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory] 16/02/24 14:10:52 INFO shim.HadoopShimsLoader: Trying to locate HadoopShimProvider for hadoopVersion=2.6.0-cdh5.5.1, majorVersion=2, minorVersion=6 16/02/24 14:10:52 INFO shim.HadoopShimsLoader: Picked HadoopShim org.apache.tez.hadoop.shim.HadoopShim26, providerName=org.apache.tez.hadoop.shim.HadoopShim25_26_27Provider, overrideProviderViaConfig=null, hadoopVersion=2.6.0-cdh5.5.1, majorVersion=2, minorVersion=6 16/02/24 14:10:53 INFO client.TezClient: Tez Client Version: [ component=tez-api, version=0.8.2, revision=${buildNumber}, SCM-URL=scm:git:https://git-wip-us.apache.org/repos/asf/tez.git, buildTime=2016-02-17T06:18:24Z ] 16/02/24 14:10:53 INFO client.RMProxy: Connecting to ResourceManager at 도메인/1.0.0.1:8032 16/02/24 14:10:54 INFO examples.OrderedWordCount: Running OrderedWordCount 16/02/24 14:10:54 INFO client.TezClient: Submitting DAG application with id: application_1456289431293_0004 16/02/24 14:10:54 INFO client.TezClientUtils: Using tez.lib.uris value from configuration: hdfs:///apps/tez-0.8.2/tez-0.8.2.tar.gz 16/02/24 14:10:54 INFO client.TezClient: Tez system stage directory hdfs://도메인:8020/tmp/user/tez/staging/.tez/application_1456289431293_0004 doesn't exist and is created 16/02/24 14:10:54 INFO client.TezClient: Submitting DAG to YARN, applicationId=application_1456289431293_0004, dagName=OrderedWordCount, callerContext={ context=TezExamples, callerType=null, callerId=null } 16/02/24 14:10:54 INFO impl.YarnClientImpl: Submitted application application_1456289431293_0004 16/02/24 14:10:54 INFO client.TezClient: The url to track the Tez AM: http://도메인:8088/proxy/application_1456289431293_0004/ 16/02/24 14:10:59 INFO client.RMProxy: Connecting to ResourceManager at 도메인/1.0.0.1:8032 16/02/24 14:10:59 INFO client.DAGClientImpl: DAG initialized: CurrentState=Running 16/02/24 14:10:59 INFO client.DAGClientImpl: DAG: State: RUNNING Progress: 0% TotalTasks: 3 Succeeded: 0 Running: 0 Failed: 0 Killed: 0 16/02/24 14:10:59 INFO client.DAGClientImpl: VertexStatus: VertexName: Tokenizer Progress: 0% TotalTasks: 1 Succeeded: 0 Running: 0 Failed: 0 Killed: 0 16/02/24 14:10:59 INFO client.DAGClientImpl: VertexStatus: VertexName: Summation Progress: 0% TotalTasks: 1 Succeeded: 0 Running: 0 Failed: 0 Killed: 0 16/02/24 14:10:59 INFO client.DAGClientImpl: VertexStatus: VertexName: Sorter Progress: 0% TotalTasks: 1 Succeeded: 0 Running: 0 Failed: 0 Killed: 0 16/02/24 14:11:03 INFO client.DAGClientImpl: DAG: State: RUNNING Progress: 33.33% TotalTasks: 3 Succeeded: 1 Running: 1 Failed: 0 Killed: 0 16/02/24 14:11:03 INFO client.DAGClientImpl: VertexStatus: VertexName: Tokenizer Progress: 100% TotalTasks: 1 Succeeded: 1 Running: 0 Failed: 0 Killed: 0 16/02/24 14:11:03 INFO client.DAGClientImpl: VertexStatus: VertexName: Summation Progress: 0% TotalTasks: 1 Succeeded: 0 Running: 1 Failed: 0 Killed: 0 16/02/24 14:11:03 INFO client.DAGClientImpl: VertexStatus: VertexName: Sorter Progress: 0% TotalTasks: 1 Succeeded: 0 Running: 0 Failed: 0 Killed: 0 16/02/24 14:11:03 INFO client.DAGClientImpl: DAG: State: SUCCEEDED Progress: 100% TotalTasks: 3 Succeeded: 3 Running: 0 Failed: 0 Killed: 0 16/02/24 14:11:03 INFO client.DAGClientImpl: VertexStatus: VertexName: Tokenizer Progress: 100% TotalTasks: 1 Succeeded: 1 Running: 0 Failed: 0 Killed: 0 16/02/24 14:11:03 INFO client.DAGClientImpl: VertexStatus: VertexName: Summation Progress: 100% TotalTasks: 1 Succeeded: 1 Running: 0 Failed: 0 Killed: 0 16/02/24 14:11:03 INFO client.DAGClientImpl: VertexStatus: VertexName: Sorter Progress: 100% TotalTasks: 1 Succeeded: 1 Running: 0 Failed: 0 Killed: 0 16/02/24 14:11:03 INFO client.DAGClientImpl: DAG completed. FinalState=SUCCEEDED




그런데 hive에서 tez엔진으로 바꿔서 실행하면 에러.


hive> set hive.execution.engine=tez;

hive> select kwd_no, count(1) as cnt from sample.t_kwd group by kwd_no;

Query ID = user_20160224140808_85d8aa8d-cb4d-4ce7-a250-d598fa938386

Total jobs = 1

Launching Job 1 out of 1



Status: Running (Executing on YARN cluster with App id application_1456289431293_0003)


--------------------------------------------------------------------------------

        VERTICES      STATUS  TOTAL  COMPLETED  RUNNING  PENDING  FAILED  KILLED

--------------------------------------------------------------------------------

Map 1                 FAILED     -1          0        0       -1       0       0

Reducer 2             KILLED      1          0        0        1       0       0

--------------------------------------------------------------------------------

VERTICES: 00/02  [>>--------------------------] 0%    ELAPSED TIME: 0.22 s

--------------------------------------------------------------------------------

Status: Failed

Vertex failed, vertexName=Map 1, vertexId=vertex_1456289431293_0003_1_00, diagnostics=[Vertex vertex_1456289431293_0003_1_00 [Map 1] killed/failed due to:ROOT_INPUT_INIT_FAILURE, Vertex Input: t_kwd initializer failed, vertex=vertex_1456289431293_0003_1_00 [Map 1], java.lang.ArithmeticException: / by zero

        at org.apache.hadoop.hive.ql.exec.tez.HiveSplitGenerator.initialize(HiveSplitGenerator.java:122)

        at org.apache.tez.dag.app.dag.RootInputInitializerManager$InputInitializerCallable$1.run(RootInputInitializerManager.java:278)

        at org.apache.tez.dag.app.dag.RootInputInitializerManager$InputInitializerCallable$1.run(RootInputInitializerManager.java:269)

        at java.security.AccessController.doPrivileged(Native Method)

        at javax.security.auth.Subject.doAs(Subject.java:415)

        at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1671)

        at org.apache.tez.dag.app.dag.RootInputInitializerManager$InputInitializerCallable.call(RootInputInitializerManager.java:269)

        at org.apache.tez.dag.app.dag.RootInputInitializerManager$InputInitializerCallable.call(RootInputInitializerManager.java:253)

        at java.util.concurrent.FutureTask.run(FutureTask.java:262)

        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)

        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)

        at java.lang.Thread.run(Thread.java:745)

]

Vertex killed, vertexName=Reducer 2, vertexId=vertex_1456289431293_0003_1_01, diagnostics=[Vertex received Kill in INITED state., Vertex vertex_1456289431293_0003_1_01 [Reducer 2] killed/failed due to:OTHER_VERTEX_FAILURE]

DAG did not succeed due to VERTEX_FAILURE. failedVertices:1 killedVertices:1

FAILED: Execution Error, return code 2 from org.apache.hadoop.hive.ql.exec.tez.TezTask




+ Recent posts