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

Aaron T. Myers updated HDFS-2190:
---------------------------------

    Attachment: hdfs-2190.1.patch

I can't say for sure what caused the truncation, but with the current code 
there is a race between the fstime file being created and a value being written 
to it. If the NN were to crash in between the two, this would leave the file 
empty.

Updated patch addressing Todd's comments. This back-ports 
{{AtomicFileOutputStream}} from trunk. This patch also takes the further 
liberty of cleaning up some bad indentation in 
{{FSImage.incrementCheckpointTime}}.

> NN fails to start if it encounters an empty or malformed fstime file
> --------------------------------------------------------------------
>
>                 Key: HDFS-2190
>                 URL: https://issues.apache.org/jira/browse/HDFS-2190
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: name-node
>    Affects Versions: 0.20.203.0
>            Reporter: Aaron T. Myers
>            Assignee: Aaron T. Myers
>         Attachments: hdfs-2190.0.patch, hdfs-2190.1.patch
>
>
> On startup, the NN reads the fstime file of all the configured dfs.name.dirs 
> to determine which one to load. However, if any of the searched directories 
> contain an empty or malformed fstime file, the NN will fail to start. The NN 
> should be able to just proceed with starting and ignore the directory 
> containing the bad fstime file.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to