I m new to Hadoop/Hive. I am trying to process xml files with hive.After googling for a while ,I came across custom FileFormat code for xml files that can be used for the purpose .
(Hre is the source Code for Customs xmlinputformat category : 页: 1
我添加了Xmlinputformat等级的jar,并制作了一个样本表:
create table person (
name string
)
ROW FORMAT DELIMITED
FIELDS TERMINATED BY
STORED AS INPUTFORMAT com.hadoop.xmlparser.XmlInputFormat
OUTPUTFORMAT org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat ;
我试图从上述表格中检索数据,并得出以下错误:
Execution Error, Return Code 2 from org.apache.hadoop.hive.ql.exec.MapRedTask
Following are the errors found in the jobtracker logs :
java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
at org.apache.hadoop.hive.shims.Hadoop20SShims$CombineFileRecordReader.initNextRecordReader(Hadoop20SShims.java:306)
at org.apache.hadoop.hive.shims.Hadoop20SShims$CombineFileRecordReader.<init>(Hadoop20SShims.java:269)
at org.apache.hadoop.hive.shims.Hadoop20SShims$CombineFileInputFormatShim.getRecordReader(Hadoop20SShims.java:366)
at org.apache.hadoop.hive.ql.io.CombineHiveInputFormat.getRecordReader(CombineHiveInputFormat.java:413)
at org.apache.hadoop.mapred.MapTask.runOldMapper(MapTask.java:371)
at org.apache.hadoop.mapred.MapTask.run(MapTask.java:325)
at org.apache.hadoop.mapred.Child$4.run(Child.java:270)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:396)
at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1127)
at org.apache.hadoop.mapred.Child.main(Child.java:264)
Caused by: java.lang.reflect.InvocationTargetException
at sun
对上述问题的任何解决办法? 感谢!