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

All Superinterfaces:
org.apache.hadoop.hdfs.server.blockmanagement.BlockCollection

public interface MutableBlockCollection
extends org.apache.hadoop.hdfs.server.blockmanagement.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, getBlockReplication, getBlocks, getLastBlock, getName, getPreferredBlockSize, 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 © 2013 Apache Software Foundation. All Rights Reserved.