Support Questions

Find answers, ask questions, and share your expertise

Hive Query Fails in Tez, Runs in MR mode

Hive Query fails with the below error when running in Tez Mode. My application dont have option to alter the execution mode. So tez is the only option. Is this a bug from Tez ? Query run fine in MR mode when tried from shell..


-------------------------------------------------------------------------------- Map 1 ..... RUNNING 494 278 0 216 343 0 Reducer 2 INITED 62 0 0 62 0 0 -------------------------------------------------------------------------------- VERTICES: 00/02 [=============>>-------------] 50% ELAPSED TIME: 41.84 s -------------------------------------------------------------------------------- Status: Failed Vertex failed, vertexName=Map 1, vertexId=vertex_1537195062060_938252_1_00, diagnostics=[Task failed, taskId=task_1537195062060_938252_1_00_000367, diagn=[TaskAttempt 0 failed, info=[Error: Failure while running task:java.lang.RuntimeException: org.apache.hadoop.hive.ql.metadata.HiveException: wrong key class: is not class at org.apache.hadoop.hive.ql.exec.tez.TezProcessor.initializeAndRunProcessor( at at at org.apache.tez.runtime.task.TezTaskRunner$TaskRunnerCallable$ at org.apache.tez.runtime.task.TezTaskRunner$TaskRunnerCallable$ at Method) at at at org.apache.tez.runtime.task.TezTaskRunner$TaskRunnerCallable.callInternal( at org.apache.tez.runtime.task.TezTaskRunner$TaskRunnerCallable.callInternal( at at at java.util.concurrent.ThreadPoolExecutor.runWorker( at java.util.concurrent.ThreadPoolExecutor$ at Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: wrong key class: class at org.apache.hadoop.hive.ql.exec.tez.MapRecordSource.pushRecord( at at org.apache.hadoop.hive.ql.exec.tez.TezProcessor.initializeAndRunProcessor( ... 14 more


Expert Contributor

Probably you might be hitting TEZ-2741.

can you try to run the query by setting below config

View solution in original post


Same problem here while triying to insert in the Sandbox HDP 2.6.4.

And the MapReduce mode is very slow too, it would be great be able to use Hive with TEZ.


@Krystle Salazar

Set that on the hive CLI

set hive.executio.engine=tez;

Should do

Expert Contributor

Probably you might be hitting TEZ-2741.

can you try to run the query by setting below config

Worked like a charm!. Thank you.

Take a Tour of the Community
Don't have an account?
Your experience may be limited. Sign in to explore more.