Hi , I am creating a External Table using XML file with SerDe . Table creation was successful , but while selecting getting exception "Bytes consumed error"
Query:
Using Hive View 2.0
ADD JAR hdfs:///user/rprekhi/hivexmlserde-1.0.5.3.jar;
select * from iai_rprekhi.fm_test_7;
Table DDL:
ADD JAR hdfs:///user/rprekhi/hivexmlserde-1.0.5.3.jar;
CREATE EXTERNAL TABLE fm_test_7(
baitSet string,
meanExonDepth string,
nucleicAcidType string
)
ROW FORMAT SERDE
'com.ibm.spss.hive.serde2.xml.XmlSerDe'
WITH SERDEPROPERTIES (
"column.xpath.baitSet"="/sample/@bait-set",
"column.xpath.meanExonDepth"="/sample/@mean-exon-depth",
"column.xpath.nucleicAcidType"="/sample/@nucleic-acid-type"
)
STORED AS
INPUTFORMAT 'com.ibm.spss.hive.serde2.xml.XmlInputFormat'
OUTPUTFORMAT 'org.apache.hadoop.hive.ql.io.IgnoreKeyTextOutputFormat'
LOCATION 'hdfs://d1drlhadoop05.foobar.edu:8020/user/rprekhi/FM'
TBLPROPERTIES (
"xmlinput.start"="<sample",
"xmlinput.end"="/sample>"
);
This is the exception:
<small>
org.apache.hive.service.cli.HiveSQLException: java.io.IOException: java.lang.RuntimeException: bytes consumed error!
org.apache.hive.service.cli.HiveSQLException: java.io.IOException: java.lang.RuntimeException: bytes consumed error!
at org.apache.hive.jdbc.Utils.verifySuccess(Utils.java:264)
at org.apache.hive.jdbc.Utils.verifySuccessWithInfo(Utils.java:250)
at org.apache.hive.jdbc.HiveQueryResultSet.next(HiveQueryResultSet.java:373)
at org.apache.ambari.view.hive20.actor.ResultSetItera...</small>