[ 
http://issues.apache.org/jira/browse/HADOOP-803?page=comments#action_12458988 ] 
            
Raghu Angadi commented on HADOOP-803:
-------------------------------------


block-refs-4.patch : adds Konstantin's suggestion above.  Diff between 3 and 4 :

-            block = containingNodes.first().getBlock(block.getBlockId());
+            Block storedBlock = 
+                containingNodes.first().getBlock(block.getBlockId());
+            // update stored block's length.
+            if ( block != storedBlock && block.getNumBytes() > 0 ) {
+                storedBlock.setNumBytes( block.getNumBytes() );
+            }

We now update the block length with the length reported by latest datanode. 

As before this does not affect block lengths of blocks that belong to files 
that created during previous runs of the namenode.


> Reducing memory consumption on Namenode : Part 1
> ------------------------------------------------
>
>                 Key: HADOOP-803
>                 URL: http://issues.apache.org/jira/browse/HADOOP-803
>             Project: Hadoop
>          Issue Type: Bug
>          Components: dfs
>            Reporter: Raghu Angadi
>         Assigned To: Sameer Paranjpye
>         Attachments: block-refs-2.patch, block-refs-3.patch, 
> block-refs-4.patch
>
>
> There appears to be some places in Namenode that allow reducing memory 
> consumption without intrusive code or feature changes. This bug is an initial 
> attempt making those changes. Please include your thoughts as well. 
> One change I am planning to make : 
> Currently one copy of each block exists for each of the replicas and one copy 
> for blockMap. I think they are all supposed to be same.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to