hive-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Prasanth Jayachandran (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (HIVE-12673) Orcfiledump throws NPE when no files are available
Date Mon, 14 Dec 2015 23:38:46 GMT

    [ https://issues.apache.org/jira/browse/HIVE-12673?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15056982#comment-15056982
] 

Prasanth Jayachandran edited comment on HIVE-12673 at 12/14/15 11:38 PM:
-------------------------------------------------------------------------

The problem is JSONObject is in incomplete state. I think we should fix that. 

1) If the files list is empty or null return at the beginning of the function
2) line:208. Add else condition and do writer.endObject() to finish the object as 'done'



was (Author: prasanth_j):
The problem is JSONObject is in complete state. I think we should fix that. 

1) If the files list is empty or null return at the beginning of the function
2) line:208. Add else condition and do writer.endObject() to finish the object as 'done'


> Orcfiledump throws NPE when no files are available
> --------------------------------------------------
>
>                 Key: HIVE-12673
>                 URL: https://issues.apache.org/jira/browse/HIVE-12673
>             Project: Hive
>          Issue Type: Bug
>            Reporter: Rajesh Balamohan
>            Assignee: Rajesh Balamohan
>         Attachments: HIVE-12673.1.patch
>
>
> {noformat}
> Exception in thread "main" java.lang.NullPointerException
> 	at org.codehaus.jettison.json.JSONTokener.more(JSONTokener.java:106)
> 	at org.codehaus.jettison.json.JSONTokener.next(JSONTokener.java:116)
> 	at org.codehaus.jettison.json.JSONTokener.nextClean(JSONTokener.java:170)
> 	at org.codehaus.jettison.json.JSONObject.<init>(JSONObject.java:185)
> 	at org.codehaus.jettison.json.JSONObject.<init>(JSONObject.java:293)
> 	at org.apache.hadoop.hive.ql.io.orc.JsonFileDump.printJsonMetaData(JsonFileDump.java:197)
> 	at org.apache.hadoop.hive.ql.io.orc.FileDump.main(FileDump.java:107)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> 	at java.lang.reflect.Method.invoke(Method.java:497)
> 	at org.apache.hadoop.util.RunJar.run(RunJar.java:221)
> 	at org.apache.hadoop.util.RunJar.main(RunJar.java:136)
> {noformat}
> hive --orcfiledump -j -p /tmp/orc/inventory/inv_date_sk=2452654



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message