Package org.apache.accumulo.core.spi.fs
Class SpaceAwareVolumeChooser
java.lang.Object
org.apache.accumulo.core.spi.fs.RandomVolumeChooser
org.apache.accumulo.core.spi.fs.PreferredVolumeChooser
org.apache.accumulo.core.spi.fs.SpaceAwareVolumeChooser
- All Implemented Interfaces:
VolumeChooser
A
PreferredVolumeChooser that takes remaining HDFS space into account when making a
volume choice rather than a simpler round-robin. The list of volumes to use can be limited using
the same properties as PreferredVolumeChooser- Since:
- 2.1.0
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionchoose(VolumeChooserEnvironment env, Set<String> options) Selects a volume at random from the provided set of volumes.protected doublegetFreeSpace(String uri) Methods inherited from class org.apache.accumulo.core.spi.fs.PreferredVolumeChooser
choosable
-
Field Details
-
RECOMPUTE_INTERVAL
- See Also:
-
-
Constructor Details
-
SpaceAwareVolumeChooser
public SpaceAwareVolumeChooser()
-
-
Method Details
-
getFreeSpace
- Throws:
IOException
-
choose
Description copied from class:RandomVolumeChooserSelects a volume at random from the provided set of volumes. The environment scope is not utilized.- Specified by:
choosein interfaceVolumeChooser- Overrides:
choosein classPreferredVolumeChooser- Parameters:
env- the server environment provided by the calling frameworkoptions- the list of volumes to choose from- Returns:
- a volume from the list of volume options
-