[
https://issues.apache.org/jira/browse/HDFS-528?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12868786#action_12868786
]
Konstantin Shvachko commented on HDFS-528:
------------------------------------------
SafeMode was designed to be agnostic of the data-node body on the cluster.
There is no way for the NN to know how many data-nodes will report.
I like Dhriba's idea of counting nodes in {{dfsadmin -report}}.
Another way to verify that "DFS is writable" is to call {{getStats()}} and
check that the number of under-replicated and missing blocks is 0.
I don't mind introducing a dfsadmin command for that, we already have similar
things in MiniDFSCluster.
But I don't think this logic should be incorporated in SafeMode.
> Add ability for safemode to wait for a minimum number of live datanodes
> -----------------------------------------------------------------------
>
> Key: HDFS-528
> URL: https://issues.apache.org/jira/browse/HDFS-528
> Project: Hadoop HDFS
> Issue Type: New Feature
> Components: scripts
> Affects Versions: 0.22.0
> Reporter: Todd Lipcon
> Assignee: Todd Lipcon
> Attachments: hdfs-528-v2.txt, hdfs-528-v3.txt, hdfs-528.txt,
> hdfs-528.txt
>
>
> When starting up a fresh cluster programatically, users often want to wait
> until DFS is "writable" before continuing in a script. "dfsadmin -safemode
> wait" doesn't quite work for this on a completely fresh cluster, since when
> there are 0 blocks on the system, 100% of them are accounted for before any
> DNs have reported.
> This JIRA is to add a command which waits until a certain number of DNs have
> reported as alive to the NN.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.