[ 
https://issues.apache.org/jira/browse/HDFS-884?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Steve Loughran updated HDFS-884:
--------------------------------

    Attachment: HDFS-884.patch

Patch changes logging, prints exception stack traces on failure if you want to 
see where things went wrong.

After everything fails, the list of directories absolute paths is printed (in 
quotes), at the error level. {{makeInstance()}} still returns null at this 
time, which is the expected behaviour. It just now has more stuff in the logs.

I also took the opportunity to move from an indexed for loop to a foreach loop, 
which 

Tests? None. You'd need to start a datanode without valid directories and look 
for system output captured somewhere. Tricky. Messing with system.out upsets 
test harnesses no end. 

> DataNode makeInstance should report the directory list when failing to start 
> up
> -------------------------------------------------------------------------------
>
>                 Key: HDFS-884
>                 URL: https://issues.apache.org/jira/browse/HDFS-884
>             Project: Hadoop HDFS
>          Issue Type: Improvement
>          Components: data-node
>    Affects Versions: 0.22.0
>            Reporter: Steve Loughran
>            Assignee: Steve Loughran
>            Priority: Minor
>         Attachments: HDFS-884.patch
>
>
> When {{Datanode.makeInstance()}} cannot work with one of the directories in 
> dfs.data.dir, it logs this at warn level (while losing the stack trace). 
> It should include the nested exception for better troubleshooting. Then, when 
> all dirs in the list fail, an exception is thrown, but this exception does 
> not include the list of directories. It should list the absolute path of 
> every missing/failing directory, so that whoever sees the exception can see 
> where to start looking for problems: either the filesystem or the 
> configuration. 

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

Reply via email to