[
https://issues.apache.org/jira/browse/HCATALOG-530?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13501566#comment-13501566
]
Daniel Dai commented on HCATALOG-530:
-------------------------------------
+1
> HCatBaseLoader.getSizeInBytes NPE when partition path is missing
> ----------------------------------------------------------------
>
> Key: HCATALOG-530
> URL: https://issues.apache.org/jira/browse/HCATALOG-530
> Project: HCatalog
> Issue Type: Bug
> Affects Versions: 0.5
> Reporter: Travis Crawford
> Assignee: Travis Crawford
> Fix For: 0.5
>
> Attachments: HCATALOG-530_get_size_npe.1.patch
>
>
> If you have the misfortune of having a partition in the metadata service that
> does not exist on disk {{HCatBaseLoader.getSizeInBytes}} will throw an NPE in
> this section:
> {code}
> for (FileStatus child : p.getFileSystem(conf).listStatus(p)) {
> sizeInBytes += child.getLen();
> }
> {code}
> because {{listStatus}} returns null of the path does not exist. Pig
> eventually blows up in {{PigInputFormat.getSplits}} with a useful error
> message, saying the path (which it helpfully shows you) does not exist.
> Since Pig will give a useful error message later, I think we should simply
> skip reporting the size of missing partitions.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira