在collect_list,collect_set或group_concat之后如何修复Hive错误?

时间:2018-12-26 16:36:45

标签: hive

假设我的配置单元表包含以下值:

------------+------------------------+
| col1  |       col2        |
+------------+------------------------+
| philippe   | 24-DEC-18 05.16.32 PM  |
| hie        | 24-DEC-18 05.18.26 PM  |
| philippe   | 26-DEC-18 05.16.32 PM  |
| hie        | 26-DEC-18 05.18.26 PM  |
+------------+------------------------+

我正在使用hive 2.3.4。在collect_list / collect_set或group_concat查询后出现此错误。

select col1, collect_set(col2) from table_name group by col1;
  

错误:org.apache.hive.service.cli.HiveSQLException:处理语句时出错:FAILED:执行错误,从以下位置返回代码2   org.apache.hadoop.hive.ql.exec.mr.MapRedTask               在org.apache.hive.service.cli.operation.Operation.toSQLException(Operation.java:380)               在org.apache.hive.service.cli.operation.SQLOperation.runQuery(SQLOperation.java:257)               在org.apache.hive.service.cli.operation.SQLOperation.access $ 800(SQLOperation.java:91)               在org.apache.hive.service.cli.operation.SQLOperation $ BackgroundWork $ 1.run(SQLOperation.java:348)               在java.security.AccessController.doPrivileged(本机方法)               在javax.security.auth.Subject.doAs(Subject.java:422)               在org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1893)               在org.apache.hive.service.cli.operation.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.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)               在java.util.concurrent.ThreadPoolExecutor $ Worker.run(ThreadPoolExecutor.java:624)               在java.lang.Thread.run(Thread.java:748)(state = 08S01,code = 2)

1 个答案:

答案 0 :(得分:1)

我通过杀死hiveserver进程并再次运行来解决了这个问题。谁能解释为什么会这样?