Package org.apache.accumulo.core.spi.fs
Class DelegatingChooser
- java.lang.Object
-
- org.apache.accumulo.core.spi.fs.DelegatingChooser
-
- All Implemented Interfaces:
VolumeChooser
public class DelegatingChooser extends Object implements VolumeChooser
AVolumeChooser
that delegates to another volume chooser based on other properties: table.custom.volume.chooser for tables, and general.custom.volume.chooser.scoped for scopes. general.custom.volume.chooser.{scope} can override the system-wide setting for general.custom.volume.chooser.scoped. At the time this was written, the only known scope was "logger".- Since:
- 2.1.0
-
-
Constructor Summary
Constructors Constructor Description DelegatingChooser()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Set<String>
choosable(VolumeChooserEnvironment env, Set<String> options)
Return the subset of volumes that could possibly be chosen by this chooser across all invocations ofVolumeChooser.choose(VolumeChooserEnvironment, Set)
.String
choose(VolumeChooserEnvironment env, Set<String> options)
Choose a volume from the provided options.
-
-
-
Method Detail
-
choose
public String choose(VolumeChooserEnvironment env, Set<String> options)
Description copied from interface:VolumeChooser
Choose a volume from the provided options.- Specified by:
choose
in interfaceVolumeChooser
- Parameters:
env
- the server environment provided by the calling frameworkoptions
- the list of volumes to choose from- Returns:
- one of the options
-
choosable
public Set<String> choosable(VolumeChooserEnvironment env, Set<String> options)
Description copied from interface:VolumeChooser
Return the subset of volumes that could possibly be chosen by this chooser across all invocations ofVolumeChooser.choose(VolumeChooserEnvironment, Set)
. Currently this is used to determine if all of the volumes that could be chosen for write ahead logs support the needed filesystem operations. There may be other use cases in the future.- Specified by:
choosable
in interfaceVolumeChooser
- Parameters:
env
- the server environment provided by the calling frameworkoptions
- the subset of volumes to choose from- Returns:
- array of valid options
-
-