[英]How to fix 'org.apache.hadoop.hive.ql.metadata.HiveException' in Hive-Spark, when using simple query?
I am trying to perform a simple query on Hive - Spark engine:我正在尝试对 Hive - Spark 引擎执行一个简单的查询:
SELECT count(*) FROM classification_output GROUP BY model_id;
I keep receiving the below error:我不断收到以下错误:
Error: Error while compiling statement: FAILED: SemanticException Failed to get a spark session: org.apache.hadoop.hive.ql.metadata.HiveException: Failed to create spark client. (state=42000,code=40000)
Only ONT time it worked after 12 minutes只有 ONT 时间它在 12 分钟后工作
The number of records on the table are around ~7K, I suspect a configuration issue, but I am not sure which parameter.表上的记录数约为 7K,我怀疑是配置问题,但我不确定是哪个参数。
I tried to:我试过了:
Note:笔记:
Using:使用:
SELECT count(*) FROM classification_output;
With no group by....
works just fine and return the below:没有
group by....
工作正常并返回以下内容:
+-------+
| _c0 |
+-------+
| 7164 |
+-------+
1 row selected (0.092 seconds)
After spending some time around this issue, I managed to find the solution.花了一些时间解决这个问题后,我设法找到了解决方案。 It has nothing to do with the query.
它与查询无关。 There was another SparkClient process running, once I stopped it and executed the query it works fine.
有另一个 SparkClient 进程正在运行,一旦我停止它并执行查询,它就可以正常工作。
For anyone that lands here with the error对于遇到错误的任何人
Syntax or semantic analysis error thrown in server while executing query. Error message from server: Error while compiling statement:FAILED: SemanticException Got exception though getTableObjectByName method should ignore it
check your authentication.检查您的身份验证。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.