简体   繁体   English

蜂巢-选择计数(*)不适用于Tez,但适用于MR

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

I have a Hive external table with parquet data. 我有一个带有木地板数据的Hive外部表。

When I run select count(*) from table1 , it fails with Tez. 当我select count(*) from table1运行select count(*) from table1 ,它出现Tez失败。

But when execution engine is changed to MR it works. 但是,当执行引擎更改为MR时,它将起作用。 Any idea why it's failing with Tez? 知道为什么Tez失败了吗? I'm getting the following error with Tez: 我在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.ThreadPool 错误:org.apache.hive.service.cli.HiveSQLException:处理语句时出错:失败:执行错误,从org.apache.hive的org.apache.hadoop.hive.ql.exec.tez.TezTask返回代码1。 org.apache.hive.service.cli.operation.SQLOperation.runQuery(SQLOperation.java:257)处的service.cli.operation.Operation.toSQLException(Operation.java:380)在org.apache.hive.service.cli中。 org.apache.hive.service.cli.operation.SQLOperation $ BackgroundWork $ 1.run(SQLOperation.java:348)处的operation.SQLOperation.access $ 800(SQLOperation.java:91)在java.security.AccessController.doPrivileged(本机方法) ),位于org.apache.hive.service.cli.operation的org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1698)的javax.security.auth.Subject.doAs(Subject.java:422)处。 Java上的SQLOperation $ BackgroundWork.run(SQLOperation.java:362)在java.util.concurrent.Executors $ RunnableAdapter.call(Executors.java:511)在java.util.concurrent.FutureTask.run(FutureTask.java:266)在Java .util.concurrent.ThreadPool Executor.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) Executor.runWorker(ThreadPoolExecutor.java:1149)at java.util.concurrent.ThreadPoolExecutor $ Worker.run(ThreadPoolExecutor.java:624)at java.lang.Thread.run(Thread.java:748)(状态= 08S01,代码= 1)

You have to put tez.tar.gz file on hdfs. 您必须将tez.tar.gz文件放在hdfs上。 I think you might be miss this step. 我认为您可能会错过这一步。

make a apps folder on hdfs 在hdfs上创建一个apps文件夹

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

put the tez.tar.gz file 放置tez.tar.gz文件

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

give the permission to that folder and tar 授予该文件夹和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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM