hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Matthew Jacobs (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HDFS-3446) HostsFileReader silently ignores bad includes/excludes
Date Thu, 07 Jun 2012 16:10:24 GMT

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

Matthew Jacobs commented on HDFS-3446:
--------------------------------------

Thanks, Todd.

* Should be using String.isEmpty() - the != check is reference-equality so it will never trigger
** {color:red}MJ:{color} Yup, thanks for catching. Stupid mistake.
* Probably good to switch to conf.getTrimmed() here
** {color:red}MJ:{color} Yeah, or I'll trim() - that might be more convenient because I'd
like the default value be the empty string.
* Why do we need to do the checks in the set calls? i.e. why not just have the exception thrown
when we try to access the file?
** {color:red}MJ:{color} The idea was to fail fast because it seems like a better behavior,
though it's not necessary. I don't feel strongly about this, so if you'd prefer to simply
fail when the file is accessed, I'll remove these additional checks.
* When the refresh call throws an exception, does that properly propagate back to the admin
who requested the refresh?
** {color:red}MJ:{color} Yes, I've tested this and the HostsFileReader throws an IOException
that is propagated back to the dfsadmin.
                
> HostsFileReader silently ignores bad includes/excludes
> ------------------------------------------------------
>
>                 Key: HDFS-3446
>                 URL: https://issues.apache.org/jira/browse/HDFS-3446
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: name-node
>    Affects Versions: 1.0.0, 2.0.0-alpha
>            Reporter: Matthew Jacobs
>            Assignee: Matthew Jacobs
>         Attachments: hdfs-3446.txt
>
>
> The HostsFileReader silently fails if the includes or excludes files do
> not exist or are not readable. The current behavior is to overwrite the
> existing set of hosts or excluded hosts, regardless of whether or not
> the includes/excludes file exists.
> This behavior was introduced in HADOOP-5643 to support updating the job
> tracker's node lists. The HostsFileReader is no longer used by the job
> tracker. If this behavior was intentional, it no longer seems necessary
> for any reason. The HostsFileReader is still used by NodeListManager as
> well as the DatanodeManager, and in both cases, throwing an exception
> when the include/exclude files aren't found/readable is desirable.
> We should validate the given includes and excludes files before using
> them.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message