Package org.apache.accumulo.server.fs
Class RandomVolumeChooser
- java.lang.Object
-
- org.apache.accumulo.server.fs.RandomVolumeChooser
-
- All Implemented Interfaces:
VolumeChooser
- Direct Known Subclasses:
PreferredVolumeChooser
public class RandomVolumeChooser extends Object implements VolumeChooser
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.accumulo.server.fs.VolumeChooser
VolumeChooser.VolumeChooserException
-
-
Constructor Summary
Constructors Constructor Description RandomVolumeChooser()
-
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.
-
-
-
Field Detail
-
random
protected final Random random
-
-
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
- 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
-
-