[
https://issues.apache.org/jira/browse/HDFS-49?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Aaron T. Myers updated HDFS-49:
-------------------------------
Labels: newbie (was: )
> MiniDFSCluster.stopDataNode will always shut down a node in the cluster if a
> matching name is not found
> -------------------------------------------------------------------------------------------------------
>
> Key: HDFS-49
> URL: https://issues.apache.org/jira/browse/HDFS-49
> Project: Hadoop HDFS
> Issue Type: Bug
> Reporter: Steve Loughran
> Priority: Minor
> Labels: newbie
>
> The stopDataNode method will shut down the last node in the list of nodes, if
> one matching a specific name is not found
> This is possibly not what was intended. Better to return false or fail in
> some other manner if the named node was not located
> synchronized boolean stopDataNode(String name) {
> int i;
> for (i = 0; i < dataNodes.size(); i++) {
> DataNode dn = dataNodes.get(i).datanode;
> if (dn.dnRegistration.getName().equals(name)) {
> break;
> }
> }
> return stopDataNode(i);
> }
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira