简体   繁体   English

使用简单查询时,如何修复 Hive-Spark 中的“org.apache.hadoop.hive.ql.metadata.HiveException”?

[英]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:我试过了:

  • Restart HIVE server重启 HIVE 服务器
  • Increased the timeout for Hive server增加了 Hive 服务器的超时时间

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.

相关问题 When Spark call Hive from oozie, exception raised “java.lang.ClassNotFoundException: org.apache.hadoop.hive.ql.metadata.HiveException” - When Spark call Hive from oozie, exception raised “java.lang.ClassNotFoundException: org.apache.hadoop.hive.ql.metadata.HiveException” java.lang.NoClassDefFoundError: org/apache/hadoop/hive/ql/metadata/HiveException 在 spark-shell 中查询时 - java.lang.NoClassDefFoundError: org/apache/hadoop/hive/ql/metadata/HiveException when query in spark-shell 从spark(2.11)数据帧写入配置单元分区表时,org.apache.hadoop.hive.ql.metadata.Hive.loadDynamicPartitions异常 - org.apache.hadoop.hive.ql.metadata.Hive.loadDynamicPartitions exception when writing a hive partitioned table from spark(2.11) dataframe Spark saveAsTable append saves data to hive but throws an error: org.apache.hadoop.hive.ql.metadata.Hive.alterTable - Spark saveAsTable append saves data to hive but throws an error: org.apache.hadoop.hive.ql.metadata.Hive.alterTable 无法实例化org.apache.hadoop.hive.ql.metadata.SessionHiveMetaStoreClient - Unable to instantiate org.apache.hadoop.hive.ql.metadata.SessionHiveMetaStoreClient 无法实例化org.apache.hadoop.hive.ql.metadata.SessionHiveMetaStoreClient - Unable to instantiate org.apache.hadoop.hive.ql.metadata.SessionHiveMetaStoreClient 如何修复 pyspark EMR Notebook 上的错误 - AnalysisException:无法实例化 org.apache.hadoop.hive.ql.metadata.SessionHiveMetaStoreClient - How to fix error on pyspark EMR Notebook - AnalysisException: Unable to instantiate org.apache.hadoop.hive.ql.metadata.SessionHiveMetaStoreClient 由于java.lang.NoSuchMethodException,Spark作业失败:org.apache.hadoop.hive.ql.metadata.Hive.loadDynamicPartitions - Spark job fails due to java.lang.NoSuchMethodException: org.apache.hadoop.hive.ql.metadata.Hive.loadDynamicPartitions Apache Phoenix vs Hive-Spark - Apache Phoenix vs Hive-Spark NoSuchMethodErro:org.apache.hadoop.hive.ql.exec.Utilities.copyTableJobPropertiesToConf - NoSuchMethodErro:org.apache.hadoop.hive.ql.exec.Utilities.copyTableJobPropertiesToConf
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM