You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by "Arpit Agarwal (JIRA)" <ji...@apache.org> on 2016/05/13 21:41:13 UTC

[jira] [Comment Edited] (HADOOP-13140) GlobalStorageStatistics should check null FileSystem scheme to avoid NPE

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

Arpit Agarwal edited comment on HADOOP-13140 at 5/13/16 9:40 PM:
-----------------------------------------------------------------

Yes as Steve suggested I think it's better to have a special statistics object for the "null"/missing scheme instead of assuming that null means "file".

Java maps support a null key so that part will work fine but it may require non-trivial changes in FileSystemStorageStatistics/GlobalStatistics if it is assumed the scheme is non-null everywhere.


was (Author: arpitagarwal):
Yes I think it's better to have a special statistics object for the "null" scheme instead of assuming that null means "file" as Steve suggests.

Java maps support a null key so that part will work fine but it may require non-trivial changes in FileSystemStorageStatistics/GlobalStatistics if it is assumed the scheme is non-null everywhere.

> GlobalStorageStatistics should check null FileSystem scheme to avoid NPE
> ------------------------------------------------------------------------
>
>                 Key: HADOOP-13140
>                 URL: https://issues.apache.org/jira/browse/HADOOP-13140
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: fs
>    Affects Versions: 2.8.0
>            Reporter: Brahma Reddy Battula
>            Assignee: Mingliang Liu
>         Attachments: HADOOP-13140.000.patch
>
>
> {{org.apache.hadoop.fs.GlobalStorageStatistics#put}} is not checking the null scheme, and the internal map will complain NPE. This was reported by a flaky test {{TestFileSystemApplicationHistoryStore}}. Thanks [~brahmareddy] for reporting.
> To address this,
> # Fix the test by providing a valid URI, e.g. {{file:///}}
> # Guard the null scheme in {{GlobalStorageStatistics#put}}



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

---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org