hadoop-common-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tsz Wo (Nicholas), SZE (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HADOOP-5687) Hadoop NameNode throws NPE if fs.default.name is the default value
Date Wed, 22 Apr 2009 18:27:47 GMT

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

Tsz Wo (Nicholas), SZE commented on HADOOP-5687:
------------------------------------------------

{code}
+    if (! filesystemURI.getScheme().equals(FSConstants.HDFS_URI_SCHEME)) {
{code}

I suggest changing the line above to 
{code}
+    if (!FSConstants.HDFS_URI_SCHEME.equalsIgnoreCase(filesystemURI.getScheme())) {
{code}
since (1) schemes are case in-sensitive and (2) filesystemURI.getScheme() may return null.

> Hadoop NameNode throws NPE if fs.default.name is the default value
> ------------------------------------------------------------------
>
>                 Key: HADOOP-5687
>                 URL: https://issues.apache.org/jira/browse/HADOOP-5687
>             Project: Hadoop Core
>          Issue Type: Improvement
>          Components: dfs
>            Reporter: Philip Zeyliger
>            Priority: Minor
>         Attachments: HADOOP-5687-v3.patch, HADOOP-5687-v4.patch, HADOOP-5687.patch, HADOOP-5687.patch
>
>
> Throwing NPE is confusing; instead, an exception with a useful string description could
be thrown instead.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message