Package org.apache.accumulo.server.fs
Class SpaceAwareVolumeChooser
- java.lang.Object
-
- org.apache.accumulo.server.fs.RandomVolumeChooser
-
- org.apache.accumulo.server.fs.PreferredVolumeChooser
-
- org.apache.accumulo.server.fs.SpaceAwareVolumeChooser
-
- All Implemented Interfaces:
VolumeChooser
public class SpaceAwareVolumeChooser extends PreferredVolumeChooser
APreferredVolumeChooserthat 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 asPreferredVolumeChooser
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.accumulo.server.fs.VolumeChooser
VolumeChooser.VolumeChooserException
-
-
Field Summary
Fields Modifier and Type Field Description static StringRECOMPUTE_INTERVAL-
Fields inherited from class org.apache.accumulo.server.fs.RandomVolumeChooser
random
-
-
Constructor Summary
Constructors Constructor Description SpaceAwareVolumeChooser()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Stringchoose(VolumeChooserEnvironment env, String[] options)Choose a volume from the provided options.
-
-
-
Field Detail
-
RECOMPUTE_INTERVAL
public static final String RECOMPUTE_INTERVAL
- See Also:
- Constant Field Values
-
-
Method Detail
-
choose
public String choose(VolumeChooserEnvironment env, String[] options) throws VolumeChooser.VolumeChooserException
Description copied from interface:VolumeChooserChoose a volume from the provided options.- 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:
- one of the options
- Throws:
VolumeChooser.VolumeChooserException- if there is an error choosing (this is a RuntimeException); this does not preclude other RuntimeExceptions from occurring
-
-