无法validationserde:org.openx.data.jsonserde.jsonserde
我写了这个查询来在hive上创建一个表。 我的数据最初是json格式,所以我已下载并构建serde并添加了运行所需的所有jar。 但我收到以下错误:
FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. Cannot validate serde: org.openx.data.jsonserde.JsonSerDe
查询:
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;
我也遇到过这个问题。 在我的情况下,我设法通过在hive
命令提示符下添加json-serde-1.3.7-SNAPSHOT-jar-with-dependencies.jar
来解决此问题,如下所示:
hive> ADD JAR /usr/local/Hive-JSON-Serde/json-serde/target/json-serde-1.3.7-SNAPSHOT-jar-with-dependencies.jar;
以下是我在Ubuntu 14.04上遵循的步骤:
1. Fire up Linux terminal and cd /usr/local 2. sudo git clone https://github.com/rcongiu/Hive-JSON-Serde.git 3. sudo mvn -Pcdh5 clean package 4. The serde file will be in /usr/local/Hive-JSON-Serde/json-serde/target/json-serde-1.3.7-SNAPSHOT-jar-with-dependencies.jar 5. 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
版本:1.2.1
Hadoop
版本:2.7.1
参考: Hive-JSON-Serde
你必须使用maven构建克隆的项目!
mvn安装在目录/ path / directory / Hive-JSON-Serd这里我们在/ usr / local
- 没有这样的方法exceptionHadoop
- 如何在Hadoop-.20 api中指定KeyValueTextInputFormat分隔符?
- 在Hadoop的mapreduce框架中运行“Selenium Webdriver”,在地图步骤中冻结
- 包org.apache.hadoop.fs不存在
- 我怎样才能以编程方式获取Hadoop在Web界面中显示的所有作业跟踪器和任务跟踪器信息?
- Hadoop 1.2.1 – 多节点集群 – 对于Wordcount程序,Reducer阶段是否挂起?
- java.sql.SQLException:没有为jdbc找到合适的驱动程序:hive:// localhost:10000 / default
- Hadoop:如何将reducer输出合并到一个文件?
- 将文件从HDFS复制到本地计算机