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

Mingliang Liu commented on HADOOP-13140:
----------------------------------------

Thanks [~ste...@apache.org] and [~arpitagarwal] for your insightful comments.

The new design uses a TreeMap in GlobalStorageStatistics for "natural ordering 
iterator" which does not accept a null key. This is the root cause of this 
problem. Actually I think it's fine to disallow null scheme in the newly added 
GlobalStorageStatistics. To me, a null file system scheme is always a magic, 
though I'm happy with a schemeless URI.

For backward compatibility, schemaless statistics seems a good idea to me. Ping 
[~cmccabe].

> 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-unsubscr...@hadoop.apache.org
For additional commands, e-mail: common-issues-h...@hadoop.apache.org

Reply via email to