J.Andreina created HDFS-3356:
--------------------------------

             Summary: When dfs.block.size is configured to 0 the block which is 
created in rbw is never deleted
                 Key: HDFS-3356
                 URL: https://issues.apache.org/jira/browse/HDFS-3356
             Project: Hadoop HDFS
          Issue Type: Bug
          Components: name-node
    Affects Versions: 2.0.0
            Reporter: J.Andreina
            Priority: Minor
             Fix For: 2.0.0, 3.0.0


dfs.block.size=0
step 1: start NN and DN
step 2: write a file "a.txt"
The block is created in rbw and since the blocksize is 0 write fails and the 
file is not closed. DN sents in the block report , number of blocks as 1
Even after the DN has sent the block report and directory scan has been done , 
the block is not invalidated for ever.

But In earlier version when the block.size is configured to 0 default value 
will be taken and write will be successful.
NN logs:
========
{noformat}
2012-04-24 19:54:27,089 INFO org.apache.hadoop.hdfs.StateChange: BLOCK* 
processReport: from DatanodeRegistration(.18.40.117, 
storageID=DS-452047493-xx.xx.xx.xx-50076-1335277451277, infoPort=50075, 
ipcPort=50077, 
storageInfo=lv=-40;cid=CID-742fda5f-68f7-40a5-9d52-a2a15facc6af;nsid=797082741;c=0),
 blocks: 0, processing time: 0 msecs
2012-04-24 19:54:29,689 INFO org.apache.hadoop.hdfs.StateChange: BLOCK* 
NameSystem.allocateBlock: /1._COPYING_. BP-1612285678-xx.xx.xx.xx-1335277427136 
blk_-262107679534121671_1002{blockUCState=UNDER_CONSTRUCTION, 
primaryNodeIndex=-1, replicas=[ReplicaUnderConstruction[xx.xx.xx.xx:50076|RBW]]}
2012-04-24 19:54:30,113 INFO org.apache.hadoop.hdfs.StateChange: BLOCK* 
processReport: from DatanodeRegistration(xx.xx.xx.xx, 
storageID=DS-452047493-xx.xx.xx.xx-50076-1335277451277, infoPort=50075, 
ipcPort=50077, 
storageInfo=lv=-40;cid=CID-742fda5f-68f7-40a5-9d52-a2a15facc6af;nsid=797082741;c=0),
 blocks: 1, processing time: 0 msecs{noformat}

Exception message while writing a file:
=======================================
{noformat}
./hdfs dfs -put hadoop /1
12/04/24 19:54:30 WARN hdfs.DFSClient: DataStreamer Exception
java.io.IOException: BlockSize 0 is smaller than data size.  Offset of packet 
in block 4745 Aborting file /1._COPYING_
        at 
org.apache.hadoop.hdfs.DFSOutputStream$DataStreamer.run(DFSOutputStream.java:467)
put: BlockSize 0 is smaller than data size.  Offset of packet in block 4745 
Aborting file /1._COPYING_
12/04/24 19:54:30 ERROR hdfs.DFSClient: Failed to close file /1._COPYING_
java.io.IOException: BlockSize 0 is smaller than data size.  Offset of packet 
in block 4745 Aborting file /1._COPYING_
        at 
org.apache.hadoop.hdfs.DFSOutputStream$DataStreamer.run(DFSOutputStream.java:467){noformat}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to