hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tsz Wo (Nicholas), SZE (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HDFS-1332) When unable to place replicas, BlockPlacementPolicy should log reasons nodes were excluded
Date Tue, 17 May 2011 23:11:47 GMT

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

Tsz Wo (Nicholas), SZE commented on HDFS-1332:
----------------------------------------------

- For the mysterious message,
{code}
       throw new IOException("File " + src + " could only be replicated to " +
                             targets.length + " nodes, instead of " +
-                            blockManager.minReplication);
+                            blockManager.minReplication + ", because there are "
+                            + clusterMap.getNumOfLeaves() + " datanodes running.");
{code}
How about change it to the following?
{code}
+                            blockManager.minReplication + ".  There are "
+                            + clusterMap.getNumOfLeaves() + " datanode(s) running but "
+                            + excludedNodes.size() + " node(s) are excluded in this operation.");
{code}


- For the log, since failingReason is only used once.  We should eliminate it, otherwise,
there are unnecessary object creation.
{code}
-          FSNamesystem.LOG.debug("Node "+NodeBase.getPath(node)+
-              " is not chosen because the node is too busy");
+          String failingReason = "Node "+NodeBase.getPath(node)+
+              " is not chosen because the node is too busy";
+          threadLocalBuilder.get().append(node.toString()).append(": ")
+            .append(failingReason).append(" ");
{code}
BTW, we don't need to call {{toString()}} in {{node.toString()}}.

> When unable to place replicas, BlockPlacementPolicy should log reasons nodes were excluded
> ------------------------------------------------------------------------------------------
>
>                 Key: HDFS-1332
>                 URL: https://issues.apache.org/jira/browse/HDFS-1332
>             Project: Hadoop HDFS
>          Issue Type: Improvement
>          Components: name-node
>            Reporter: Todd Lipcon
>            Assignee: Ted Yu
>            Priority: Minor
>              Labels: newbie
>             Fix For: 0.23.0
>
>         Attachments: HDFS-1332-concise.patch
>
>
> Whenever the block placement policy determines that a node is not a "good target" it
could add the reason for exclusion to a list, and then when we log "Not able to place enough
replicas" we could say why each node was refused. This would help new users who are having
issues on pseudo-distributed (eg because their data dir is on /tmp and /tmp is full). Right
now it's very difficult to figure out the issue.

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

Mime
View raw message