hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Konstantin Shvachko (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HDFS-1690) Name Node should not process format command while it is running.
Date Fri, 01 Apr 2011 05:10:05 GMT

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

Konstantin Shvachko commented on HDFS-1690:
-------------------------------------------

The purpose for the lock file "in_use.lock" is to hold a lock on that file while the NameNode
is running. This is in order to prevent from accidentally starting another NN in the same
directory, which can mess up the fsimage and the edits.
When the NameNode shuts down abruptly, which it always does, as there is no other way to stop
the NameNode but to kill it, the lock on the lock file will be released, and the format will
be able to delete the file. 
Locking may be platform dependent, but is known to work for most traditional file systems.

> Name Node should not process format command while it is running.
> ----------------------------------------------------------------
>
>                 Key: HDFS-1690
>                 URL: https://issues.apache.org/jira/browse/HDFS-1690
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: name-node
>    Affects Versions: 0.20.1, 0.20.2, 0.21.0
>            Reporter: Uma Maheswara Rao G
>            Assignee: Uma Maheswara Rao G
>         Attachments: HDFS-1690.patch
>
>
> Currently NameNode allows format command while it running. In this case the command is
executed partially (Lock file is deleted) and an exception thrown. Because of this Name Node
should be formatted after restart. This sort of cases can happen accidentally. To prevent
such cases Name Node should not execute the format command partially while it is running.
It can stright away throw exception/log saying, Name Node is running.

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

Mime
View raw message