[
https://issues.apache.org/jira/browse/HDFS-1332?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13035071#comment-13035071
]
Ted Yu commented on HDFS-1332:
------------------------------
Here is the log snippet leading to the IOException:
{code}
2011-05-17 13:51:20,193 DEBUG hdfs.DFSClient (DFSOutputStream.java:run(452)) -
Allocating new block
2011-05-17 13:51:20,197 INFO hdfs.StateChange
(FSNamesystem.java:allocateBlock(1867)) - BLOCK* NameSystem.allocateBlock:
/filestatus.dat. BP-498881698-10.32.41.28-1305665466806
blk_7545771604732668451_1001{blockUCState=UNDER_CONSTRUCTION,
primaryNodeIndex=-1, replicas=[ReplicaUnderConstruction[127.0.0.1:61963|RBW]]}
2011-05-17 13:51:20,197 DEBUG hdfs.DFSClient
(DFSOutputStream.java:createBlockOutputStream(997)) - pipeline = 127.0.0.1:61963
2011-05-17 13:51:20,198 DEBUG hdfs.DFSClient
(DFSOutputStream.java:createSocketForPipeline(1152)) - Connecting to datanode
127.0.0.1:61963
2011-05-17 13:51:20,198 INFO hdfs.DFSClient
(DFSOutputStream.java:createBlockOutputStream(1044)) - Exception in
createBlockOutputStream java.net.ConnectException: Connection refused
2011-05-17 13:51:20,198 INFO hdfs.DFSClient
(DFSOutputStream.java:nextBlockOutputStream(974)) - Abandoning block
BP-498881698-10.32.41.28-1305665466806:blk_7545771604732668451_1001
2011-05-17 13:51:20,200 INFO hdfs.DFSClient
(DFSOutputStream.java:nextBlockOutputStream(977)) - Excluding datanode
127.0.0.1:61963
2011-05-17 13:51:20,202 WARN namenode.FSNamesystem
(BlockPlacementPolicyDefault.java:chooseTarget(212)) - Not able to place enough
replicas, still in need of 1 to reach 1
2011-05-17 13:51:20,203 INFO ipc.Server (Server.java:run(1434)) - IPC Server
handler 2 on 61961, call addBlock(/filestatus.dat,
DFSClient_NONMAPREDUCE_-1833786488_1, null,
[Lorg.apache.hadoop.hdfs.protocol.DatanodeInfo;@59727745), rpc version=1,
client version=67, methodsFingerPrint=-1645111634 from 127.0.0.1:61967: error:
java.io.IOException: File /filestatus.dat could
only be replicated to 0 nodes, instead of 1, because there are 1 datanodes
running.
{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
> 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