public class AvailableSpaceVolumeChoosingPolicy<V extends FsVolumeSpi> extends Object implements org.apache.hadoop.hdfs.server.datanode.fsdataset.VolumeChoosingPolicy<V>, org.apache.hadoop.conf.Configurable
| Constructor and Description |
|---|
AvailableSpaceVolumeChoosingPolicy() |
| Modifier and Type | Method and Description |
|---|---|
V |
chooseVolume(List<V> volumes,
long replicaSize,
String storageId)
Choose a volume to place a replica,
given a list of volumes and the replica size sought for storage.
|
org.apache.hadoop.conf.Configuration |
getConf() |
void |
setConf(org.apache.hadoop.conf.Configuration conf) |
public void setConf(org.apache.hadoop.conf.Configuration conf)
setConf in interface org.apache.hadoop.conf.Configurablepublic org.apache.hadoop.conf.Configuration getConf()
getConf in interface org.apache.hadoop.conf.Configurablepublic V chooseVolume(List<V> volumes, long replicaSize, String storageId) throws IOException
org.apache.hadoop.hdfs.server.datanode.fsdataset.VolumeChoosingPolicychooseVolume in interface org.apache.hadoop.hdfs.server.datanode.fsdataset.VolumeChoosingPolicy<V extends FsVolumeSpi>volumes - - a list of available volumes.replicaSize - - the size of the replica for which a volume is sought.storageId - - the storage id of the Volume nominated by the namenode.
This can usually be ignored by the VolumeChoosingPolicy.IOException - when disks are unavailable or are full.Copyright © 2008–2023 Apache Software Foundation. All rights reserved.