Package org.apache.accumulo.server.fs
Class PreferredVolumeChooser
- java.lang.Object
-
- org.apache.accumulo.server.fs.RandomVolumeChooser
-
- org.apache.accumulo.server.fs.PreferredVolumeChooser
-
- All Implemented Interfaces:
VolumeChooser
- Direct Known Subclasses:
SpaceAwareVolumeChooser
public class PreferredVolumeChooser extends RandomVolumeChooser
ARandomVolumeChooser
that limits its choices from a given set of options to the subset of those options preferred for a particular table. Defaults to selecting from all of the options presented. Can be customized via the table property table.custom.volume.preferred, which should contain a comma separated list ofVolume
URIs. Note that both the property name and the format of its value are specific to this particular implementation.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.accumulo.server.fs.VolumeChooser
VolumeChooser.VolumeChooserException
-
-
Field Summary
-
Fields inherited from class org.apache.accumulo.server.fs.RandomVolumeChooser
random
-
-
Constructor Summary
Constructors Constructor Description PreferredVolumeChooser()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
choose(VolumeChooserEnvironment env, String[] options)
Choose a volume from the provided options.
-
-
-
Method Detail
-
choose
public String choose(VolumeChooserEnvironment env, String[] options) throws VolumeChooser.VolumeChooserException
Description copied from interface:VolumeChooser
Choose a volume from the provided options.- Specified by:
choose
in interfaceVolumeChooser
- Overrides:
choose
in classRandomVolumeChooser
- 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
-
-