本文介绍了无法验证serde:org.openx.data.jsonserde.jsonserde的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 我已经写了这个查询来在配置单元上创建一个表。我的数据最初是json格式,所以我下载并构建了serde并添加了运行所需的所有jar。但我收到以下错误: FAILED:执行错误,从org.apache.hadoop.hive.ql返回代码1 .exec.DDLTask。无法验证serde:org.openx.data.jsonserde.JsonSerDe QUERY: create table tip(type string, text string, business_id string, user_id string,日期日期,喜欢int) ROW FORMAT SERDE'org.openx.data.jsonserde.JsonSerDe' WITH SERDEPROPERTIES(date.mapping=date) STORED AS TEXTFILE; 解决方案我也遇到过这个问题。在我的情况下,我设法通过添加 json-serde-1.3.7-SNAPSHOT-jar-with-dependencies.jar 来解决此问题。 $ b 蜂房> ADD JAR /usr/local/Hive-JSON-Serde/json-serde/target/json-serde-1.3.7-SNAPSHOT-jar-with-dependencies.jar; 以下是我在Ubuntu 14.04上遵循的步骤: 1。启动Linux终端和cd / usr / local 2. sudo git clone https://github.com/rcongiu/Hive-JSON-Serde.git 3。 sudo mvn -Pcdh5 clean package 4. serde文件位于 /usr/local/Hive-JSON-Serde/json-serde/target/json-serde-1.3.7 -SNAPSHOT-jar -with-dependencies.jar 5.转到hive提示符并添加JAR文件,如步骤6所示。 6. hive> ADD JAR /usr/local/Hive-JSON-Serde/json-serde/target/json-serde-1.3.7- SNAPSHOT-jar-with-dependencies.jar; 7.现在从配置单元>创建配置单元表。提示。在这个阶段,应该成功创建Hive表,没有任何错误。 Hive 版本:1.2.1 Hadoop 版本:2.7.1 参考: Hive-JSON-Serde I have written this query to create a table on hive. My data is initially in json format, so i have downloaded and build serde and added all jar required for it to run. But i am getting the following error:FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. Cannot validate serde: org.openx.data.jsonserde.JsonSerDeQUERY:create table tip(type string, text string, business_id string, user_id string, date date, likes int)ROW FORMAT SERDE 'org.openx.data.jsonserde.JsonSerDe'WITH SERDEPROPERTIES("date.mapping"="date")STORED AS TEXTFILE; 解决方案 I too encountered this problem. In my case, I managed to fix this issue by adding json-serde-1.3.7-SNAPSHOT-jar-with-dependencies.jar at hive command prompt as shown below:hive> ADD JAR /usr/local/Hive-JSON-Serde/json-serde/target/json-serde-1.3.7-SNAPSHOT-jar-with-dependencies.jar;Below are the steps I have followed on Ubuntu 14.04:1. Fire up Linux terminal and cd /usr/local2. sudo git clone https://github.com/rcongiu/Hive-JSON-Serde.git3. sudo mvn -Pcdh5 clean package4. The serde file will be in /usr/local/Hive-JSON-Serde/json-serde/target/json-serde-1.3.7-SNAPSHOT-jar-with-dependencies.jar5. Go to hive prompt and ADD JAR file as shown in Step 6.6. hive> ADD JAR /usr/local/Hive-JSON-Serde/json-serde/target/json-serde-1.3.7- SNAPSHOT-jar-with-dependencies.jar;7. Now create hive table from hive> prompt. At this stage, Hive table should be created successfully without any error.Hive Version: 1.2.1Hadoop Version: 2.7.1Reference: Hive-JSON-Serde 这篇关于无法验证serde:org.openx.data.jsonserde.jsonserde的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!
09-11 07:55