org.apache.hadoop.hdfs.server.datanode.fsdataset
Class RoundRobinVolumeChoosingPolicy<V extends FsVolumeSpi>
java.lang.Object
org.apache.hadoop.hdfs.server.datanode.fsdataset.RoundRobinVolumeChoosingPolicy<V>
- All Implemented Interfaces:
- org.apache.hadoop.hdfs.server.datanode.fsdataset.VolumeChoosingPolicy<V>
public class RoundRobinVolumeChoosingPolicy<V extends FsVolumeSpi>
- extends Object
- implements org.apache.hadoop.hdfs.server.datanode.fsdataset.VolumeChoosingPolicy<V>
Choose volumes in round-robin order.
|
Field Summary |
static org.apache.commons.logging.Log |
LOG
|
|
Method Summary |
V |
chooseVolume(List<V> volumes,
long blockSize)
Choose a volume to place a replica,
given a list of volumes and the replica size sought for storage. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LOG
public static final org.apache.commons.logging.Log LOG
RoundRobinVolumeChoosingPolicy
public RoundRobinVolumeChoosingPolicy()
chooseVolume
public V chooseVolume(List<V> volumes,
long blockSize)
throws IOException
- Description copied from interface:
org.apache.hadoop.hdfs.server.datanode.fsdataset.VolumeChoosingPolicy
- Choose a volume to place a replica,
given a list of volumes and the replica size sought for storage.
The implementations of this interface must be thread-safe.
- Specified by:
chooseVolume in interface org.apache.hadoop.hdfs.server.datanode.fsdataset.VolumeChoosingPolicy<V extends FsVolumeSpi>
- Parameters:
volumes - - a list of available volumes.blockSize - - the size of the replica for which a volume is sought.
- Returns:
- the chosen volume.
- Throws:
IOException - when disks are unavailable or are full.
Copyright © 2014 Apache Software Foundation. All Rights Reserved.