org.apache.hadoop.hdfs.server.datanode
Interface BlockVolumeChoosingPolicy

All Known Implementing Classes:
RoundRobinVolumesPolicy

@InterfaceAudience.Public
@InterfaceStability.Evolving
public interface BlockVolumeChoosingPolicy

BlockVolumeChoosingPolicy allows a DataNode to specify what policy is to be used while choosing a volume for a block request.


Method Summary
 org.apache.hadoop.hdfs.server.datanode.FSDataset.FSVolume chooseVolume(List<org.apache.hadoop.hdfs.server.datanode.FSDataset.FSVolume> volumes, long blockSize)
          Returns a specific FSVolume after applying a suitable choice algorithm to place a given block, given a list of FSVolumes and the block size sought for storage.
 

Method Detail

chooseVolume

org.apache.hadoop.hdfs.server.datanode.FSDataset.FSVolume chooseVolume(List<org.apache.hadoop.hdfs.server.datanode.FSDataset.FSVolume> volumes,
                                                                       long blockSize)
                                                                       throws IOException
Returns a specific FSVolume after applying a suitable choice algorithm to place a given block, given a list of FSVolumes and the block size sought for storage. (Policies that maintain state must be thread-safe.)

Parameters:
volumes - - the array of FSVolumes that are available.
blockSize - - the size of the block for which a volume is sought.
Returns:
the chosen volume to store the block.
Throws:
IOException - when disks are unavailable or are full.


Copyright © 2012 Apache Software Foundation. All Rights Reserved.