org.apache.hadoop.hdfs.server.datanode
Class RoundRobinVolumesPolicy
java.lang.Object
org.apache.hadoop.hdfs.server.datanode.RoundRobinVolumesPolicy
- All Implemented Interfaces:
- org.apache.hadoop.hdfs.server.datanode.BlockVolumeChoosingPolicy
public class RoundRobinVolumesPolicy
- extends Object
- implements org.apache.hadoop.hdfs.server.datanode.BlockVolumeChoosingPolicy
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RoundRobinVolumesPolicy
public RoundRobinVolumesPolicy()
chooseVolume
public FSDatasetInterface.FSVolumeInterface chooseVolume(List<FSDatasetInterface.FSVolumeInterface> volumes,
long blockSize)
throws IOException
- Description copied from interface:
org.apache.hadoop.hdfs.server.datanode.BlockVolumeChoosingPolicy
- 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.)
- Specified by:
chooseVolume in interface org.apache.hadoop.hdfs.server.datanode.BlockVolumeChoosingPolicy
- 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 © 2013 Apache Software Foundation. All Rights Reserved.