[
https://issues.apache.org/jira/browse/HDFS-979?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13055514#comment-13055514
]
Steve Loughran commented on HDFS-979:
-------------------------------------
seems reasonable and is close to committing. Some observations
# the code would need some minor reformatting to meet the normal Hadoop style
rules (primarily spacing in if() clauses)
# the test shouldn't call Throwable.getMessage(), and then compare it, as some
exceptions return null there. Safer to call toString() and assert on that, and
include text in the assertions for better failure diagnosis
# One bigger change would be should the initial condition be broken up into two
-one for dataDirs and one for editDirs? In favour of this -it's easier to see
what is at fault, but against it users may end up fixing one bug and then go
straight into the next one. It's probably simpler to leave the test as is, with
Jim's extra diagnostics.
> FSImage should specify which dirs are missing when refusing to come up
> ----------------------------------------------------------------------
>
> Key: HDFS-979
> URL: https://issues.apache.org/jira/browse/HDFS-979
> Project: Hadoop HDFS
> Issue Type: Improvement
> Components: name-node
> Affects Versions: 0.22.0
> Reporter: Steve Loughran
> Assignee: Jim Plush
> Priority: Minor
> Fix For: 0.23.0
>
> Attachments: HDFS-979-take1.txt, HDFS-979-take2.txt
>
>
> When {{FSImage}} can't come up as either it has no data or edit dirs, it
> tells me this
> {code}
> java.io.IOException: All specified directories are not accessible or do not
> exist.
> {code}
> What it doesn't do is say which of the two attributes are missing. This would
> be beneficial to anyone trying to track down the problem. Also, I don't think
> the message is correct. It's bailing out because dataDirs.size() == 0 ||
> editsDirs.size() == 0 , because a list is empty -not because the dirs aren't
> there, as there hasn't been any validation yet.
> More useful would be
> # Explicit mention of which attributes are null
> # Declare that this is because they are not in the config
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira