Package org.apache.accumulo.core.spi.fs
Interface VolumeChooser
-
- All Known Implementing Classes:
DelegatingChooser
,PreferredVolumeChooser
,RandomVolumeChooser
,SpaceAwareVolumeChooser
public interface VolumeChooser
Helper used to select a volume from a set of Volume URIs.Volumes will be selected based on defined option criteria. Note: Implementations must be threadsafe.
VolumeChooser.equals will be used for internal caching.
Property Details:
Property.GENERAL_ARBITRARY_PROP_PREFIX
andProperty.TABLE_ARBITRARY_PROP_PREFIX
can be used to define user-specific properties to ensure separation from Accumulo System defaults.
Note: The default VolumeChooser implementation is set byProperty.GENERAL_VOLUME_CHOOSER
.- Since:
- 2.1.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Set<String>
choosable(VolumeChooserEnvironment env, Set<String> options)
Return the subset of all possible volumes that could be chosen across all invocations ofchoose(VolumeChooserEnvironment, Set)
.
This is currently used to determine if the chosen volumes can support the required filesystem operations for write ahead logs.
There may be other use cases in the future.String
choose(VolumeChooserEnvironment env, Set<String> options)
Choose a volume from the provided options.
-
-
-
Method Detail
-
choose
String choose(VolumeChooserEnvironment env, Set<String> options)
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:
- a volume from the list of volume options
-
choosable
Set<String> choosable(VolumeChooserEnvironment env, Set<String> options)
Return the subset of all possible volumes that could be chosen across all invocations ofchoose(VolumeChooserEnvironment, Set)
.
This is currently used to determine if the chosen volumes can support the required filesystem operations for write ahead logs.
There may be other use cases in the future.
-
-