Package org.apache.accumulo.server.fs
Interface VolumeChooser
-
- All Known Implementing Classes:
PerTableVolumeChooser
,PreferredVolumeChooser
,RandomVolumeChooser
,SpaceAwareVolumeChooser
public interface VolumeChooser
Helper used byVolumeManager
s to select from a set ofVolume
URIs. N.B. implementations must be threadsafe. VolumeChooser.equals will be used for internal caching.Implementations may wish to store configuration in Accumulo's system configuration using the
Property.GENERAL_ARBITRARY_PROP_PREFIX
. They may also benefit from using per-table configuration usingProperty.TABLE_ARBITRARY_PROP_PREFIX
.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
VolumeChooser.VolumeChooserException
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description String
choose(VolumeChooserEnvironment env, String[] options)
Choose a volume from the provided options.
-
-
-
Method Detail
-
choose
String choose(VolumeChooserEnvironment env, String[] options) throws VolumeChooser.VolumeChooserException
Choose a volume from the provided options.- 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
-
-