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
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionchoose
(VolumeChooserEnvironment env, Set<String> options) Selects a volume at random from the provided set of volumes.protected double
getFreeSpace
(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:RandomVolumeChooser
Selects a volume at random from the provided set of volumes. The environment scope is not utilized.- Specified by:
choose
in interfaceVolumeChooser
- Overrides:
choose
in 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
-