You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by "Jean-Daniel Cryans (JIRA)" <ji...@apache.org> on 2010/10/22 00:01:26 UTC

[jira] Created: (HIVE-1741) HiveInputFormat.readFields should print the cause when there's an exception

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.


[jira] Commented: (HIVE-1741) HiveInputFormat.readFields should print the cause when there's an exception

Posted by "John Sichi (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HIVE-1741?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12923687#action_12923687 ] 

John Sichi commented on HIVE-1741:
----------------------------------

Yeah, Hive exception-swallowing is notorious.  We really need a coding standard here...

> 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.