[
https://issues.apache.org/jira/browse/HDFS-1332?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13032157#comment-13032157
]
Ted Yu commented on HDFS-1332:
------------------------------
I added a new test in TestDecommission:
{code}
@Test
public void testDecommissionForReasonableExceptionMsg() throws IOException {
startCluster(1, 2, conf);
FileSystem fileSys = cluster.getFileSystem(0);
// Decommission one node. Verify that node is decommissioned.
DatanodeInfo decomNode = decommissionNode(0, null,
AdminStates.DECOMMISSIONED);
Path file1 = new Path("testDecommission.dat");
try {
writeFile(fileSys, file1, 2);
} catch (Exception nere) {
String msg = nere.getMessage();
assertTrue("Expected detail about not enough replicas",
msg.contains("is not chosen"));
}
}
{code}
But the NotEnoughReplicasException is caught by chooseTarget().
At least I saw the following:
{code}
11/05/11 15:54:58 WARN namenode.FSNamesystem: Not able to place enough
replicas, still in need of 1 to reach 2
Not able to place enough replicas.[127.0.0.1:50055: Node
/default-rack/127.0.0.1:50055 is not chosen because the node is (being)
decommissioned ]
{code}
> 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
> Attachments: HDFS-1332.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