xmlserde错误

niwlg2el  于 2021-05-29  发布在  Hadoop
关注(0)|答案(2)|浏览(258)
  1. While trying to execute the create table statement in hive getting the below error.
  2. CREATE EXTERNAL TABLE BOOKDATA(
  3. > TITLE VARCHAR(40),
  4. > PRICE INT
  5. > )ROW FORMAT SERDE 'com.ibm.spss.hive.serde2.xml.XmlSerDe'
  6. > WITH SERDEPROPERTIES (
  7. > "column.xpath.TITLE"="/CATALOG/BOOK/TITLE/",
  8. > "column.xpath.PRICE"="/CATALOG/BOOK/PRICE/")
  9. > STORED AS
  10. > INPUTFORMAT 'com.ibm.spss.hive.serde2.xml.XmlInputFormat'
  11. > OUTPUTFORMAT 'org.apache.hadoop.hive.ql.io.IgnoreKeyTextOutputFormat'
  12. > LOCATION '/sourcedata'
  13. > TBLPROPERTIES (
  14. > "xmlinput.start"="<CATALOG",
  15. > "xmlinput.end"= "</CATALOG>"
  16. > );

失败:semanticexception找不到类“com.ibm.spss.hive.serde2.xml.xmlinputformat”
请帮助解决此问题。我正在使用配置单元cli。

jc3wubiy

jc3wubiy1#

我过去也面临过类似的问题。对我来说,结果就是把Hive引擎换成了tez。
设置hive.execution.engine=tez;
当您设置tez引擎时,它将获取运行查询所需的所有jar。
如果你觉得合适就告诉我。

hmtdttj4

hmtdttj42#

https://cwiki.apache.org/confluence/display/hive/configuration+properties#configurationproperties-查询执行
1
需要重新启动hiveserver2
Hive辅助罐路径
-默认值:(空)
-添加到:hive 0.2.0或更早版本
包含用户定义函数(UDF)和SERDE实现的插件jar的位置。
2
hive.reloadable.aux.jars.path
-默认值:(空)
-添加到:hive 0.14.0和hive-7553
插件jar的位置,可以是逗号分隔的文件夹或jar。它们可以通过执行beeline reload命令进行更新(添加、删除或更新),而无需重新启动hiveserver2。这些jar可以像hive.aux.jars.path中的辅助类一样用于创建udf或serde。

相关问题