public class AvailableSpaceVolumeChoosingPolicy<V extends FsVolumeSpi> extends Object implements VolumeChoosingPolicy<V>, Configurable
Constructor and Description |
---|
AvailableSpaceVolumeChoosingPolicy() |
Modifier and Type | Method and Description |
---|---|
V |
chooseVolume(List<V> volumes,
long replicaSize)
Choose a volume to place a replica,
given a list of volumes and the replica size sought for storage.
|
Configuration |
getConf()
Return the configuration used by this object.
|
void |
setConf(Configuration conf)
Set the configuration to be used by this object.
|
public void setConf(Configuration conf)
Configurable
setConf
in interface Configurable
public Configuration getConf()
Configurable
getConf
in interface Configurable
public V chooseVolume(List<V> volumes, long replicaSize) throws IOException
VolumeChoosingPolicy
chooseVolume
in interface VolumeChoosingPolicy<V extends FsVolumeSpi>
volumes
- - a list of available volumes.replicaSize
- - the size of the replica for which a volume is sought.IOException
- when disks are unavailable or are full.Copyright © 2013 Apache Software Foundation. All rights reserved.