org.apache.hadoop.hdfs.server.blockmanagement
Interface MutableBlockCollection

All Superinterfaces:
BlockCollection

public interface MutableBlockCollection
extends BlockCollection

This interface is used by the block manager to expose a few characteristics of a collection of Block/BlockUnderConstruction.


Method Summary
 void setBlock(int index, org.apache.hadoop.hdfs.server.blockmanagement.BlockInfo blk)
          Set the block at the given index.
 BlockInfoUnderConstruction setLastBlock(org.apache.hadoop.hdfs.server.blockmanagement.BlockInfo lastBlock, org.apache.hadoop.hdfs.server.blockmanagement.DatanodeDescriptor[] locations)
          Convert the last block of the collection to an under-construction block and set the locations.
 
Methods inherited from interface org.apache.hadoop.hdfs.server.blockmanagement.BlockCollection
computeContentSummary, getBlocks, getLastBlock, getName, getPreferredBlockSize, getReplication, numBlocks
 

Method Detail

setBlock

void setBlock(int index,
              org.apache.hadoop.hdfs.server.blockmanagement.BlockInfo blk)
Set the block at the given index.


setLastBlock

BlockInfoUnderConstruction setLastBlock(org.apache.hadoop.hdfs.server.blockmanagement.BlockInfo lastBlock,
                                        org.apache.hadoop.hdfs.server.blockmanagement.DatanodeDescriptor[] locations)
                                        throws IOException
Convert the last block of the collection to an under-construction block and set the locations.

Throws:
IOException


Copyright © 2012 Apache Software Foundation. All Rights Reserved.