Hive - Select count(*) not working with Tez with but works with MR

﹥>﹥吖頭↗ 提交于 2019-12-11 02:22:42

问题


I have a Hive external table with parquet data.

When I run select count(*) from table1, it fails with Tez.

But when execution engine is changed to MR it works. Any idea why it's failing with Tez? I'm getting the following error with Tez:

Error: org.apache.hive.service.cli.HiveSQLException: Error while processing statement: FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.tez.TezTask at org.apache.hive.service.cli.operation.Operation.toSQLException(Operation.java:380) at org.apache.hive.service.cli.operation.SQLOperation.runQuery(SQLOperation.java:257) at org.apache.hive.service.cli.operation.SQLOperation.access$800(SQLOperation.java:91) at org.apache.hive.service.cli.operation.SQLOperation$BackgroundWork$1.run(SQLOperation.java:348) 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:1698) at org.apache.hive.service.cli.operation.SQLOperation$BackgroundWork.run(SQLOperation.java:362) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) (state=08S01,code=1)


回答1:


You have to put tez.tar.gz file on hdfs. I think you might be miss this step.

make a apps folder on hdfs

hdfs dfs -mkdir -p /hadoop/apps/tez/

put the tez.tar.gzfile

hdfs dfs -put /usr/hadoop/tez/lib/tez.tar.gz /hadoop/apps/tez/

give the permission to that folder and tar

hdfs dfs -chown -R $HDFS_USER:$HADOOP_USER /hadoop
hdfs dfs -chmod -R 555 /hadoop/apps/tez
hdfs dfs -chmod -R 444 /hadoop/apps/tez/tez.tar.gz


来源:https://stackoverflow.com/questions/49503973/hive-select-count-not-working-with-tez-with-but-works-with-mr

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!