HiveInputFormat.readFields should print the cause when there's an exception
---------------------------------------------------------------------------
Key: HIVE-1741
URL: https://issues.apache.org/jira/browse/HIVE-1741
Project: Hive
Issue Type: Improvement
Affects Versions: 0.7.0
Reporter: Jean-Daniel Cryans
Priority: Trivial
Minor annoyance when it comes to debugging using exotic input formats,
currently if you do something wrong trying to get the HBase handler working you
get something like this:
{noformat}
java.io.IOException: Cannot create an instance of InputSplit class =
org.apache.hadoop.hive.hbase.HBaseSplit:org.apache.hadoop.hive.hbase.HBaseSplit
at
org.apache.hadoop.hive.ql.io.HiveInputFormat$HiveInputSplit.readFields(HiveInputFormat.java:147)
at org.apache.hadoop.mapred.MapTask.runOldMapper(MapTask.java:333)
at org.apache.hadoop.mapred.MapTask.run(MapTask.java:307)
at org.apache.hadoop.mapred.Child.main(Child.java:170)
{noformat}
It could be a lot more helpful to see the cause, in my case:
{noformat}
java.io.IOException: Cannot create an instance of InputSplit class =
org.apache.hadoop.hive.hbase.HBaseSplit:org.apache.hadoop.hive.hbase.HBaseSplit
at
org.apache.hadoop.hive.ql.io.HiveInputFormat$HiveInputSplit.readFields(HiveInputFormat.java:147)
at org.apache.hadoop.mapred.MapTask.runOldMapper(MapTask.java:333)
at org.apache.hadoop.mapred.MapTask.run(MapTask.java:307)
at org.apache.hadoop.mapred.Child.main(Child.java:170)
Caused by: java.lang.ClassNotFoundException:
org.apache.hadoop.hive.hbase.HBaseSplit
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
...
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:247)
at
org.apache.hadoop.conf.Configuration.getClassByName(Configuration.java:907)
at
org.apache.hadoop.hive.ql.io.HiveInputFormat$HiveInputSplit.readFields(HiveInputFormat.java:144)
{noformat}
It's just a matter of doing this in readFields:
{code}
- + inputSplitClassName + ":" + e.getMessage());
+ + inputSplitClassName + ":" + e.getMessage(), e);
{code}
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.