Package org.apache.accumulo.server.fs
Class VolumeChooserEnvironmentImpl
- java.lang.Object
-
- org.apache.accumulo.server.fs.VolumeChooserEnvironmentImpl
-
- All Implemented Interfaces:
VolumeChooserEnvironment
,VolumeChooserEnvironment
public class VolumeChooserEnvironmentImpl extends Object implements VolumeChooserEnvironment
Volume chooser authors should avoid using this class when testing their volume chooser. The constructors for this class may change at any time. For testing purposes mocking the interfaceVolumeChooserEnvironment
should result in more stable code over time than using this class.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.accumulo.core.spi.fs.VolumeChooserEnvironment
VolumeChooserEnvironment.Scope
-
Nested classes/interfaces inherited from interface org.apache.accumulo.server.fs.VolumeChooserEnvironment
VolumeChooserEnvironment.ChooserScope
-
-
Constructor Summary
Constructors Constructor Description VolumeChooserEnvironmentImpl(TableId tableId, org.apache.hadoop.io.Text endRow, ServerContext context)
VolumeChooserEnvironmentImpl(VolumeChooserEnvironment.Scope scope, TableId tableId, org.apache.hadoop.io.Text endRow, ServerContext context)
VolumeChooserEnvironmentImpl(VolumeChooserEnvironment.Scope scope, ServerContext context)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object obj)
VolumeChooserEnvironment.Scope
getChooserScope()
org.apache.hadoop.io.Text
getEndRow()
The end row of the tablet for which a volume is being chosen.org.apache.hadoop.fs.FileSystem
getFileSystem(String option)
ServiceEnvironment
getServiceEnv()
Optional<TableId>
getTable()
TableId
getTableId()
int
hashCode()
boolean
hasTableId()
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.accumulo.server.fs.VolumeChooserEnvironment
getScope
-
-
-
-
Constructor Detail
-
VolumeChooserEnvironmentImpl
public VolumeChooserEnvironmentImpl(VolumeChooserEnvironment.Scope scope, ServerContext context)
-
VolumeChooserEnvironmentImpl
public VolumeChooserEnvironmentImpl(TableId tableId, org.apache.hadoop.io.Text endRow, ServerContext context)
-
VolumeChooserEnvironmentImpl
public VolumeChooserEnvironmentImpl(VolumeChooserEnvironment.Scope scope, TableId tableId, org.apache.hadoop.io.Text endRow, ServerContext context)
-
-
Method Detail
-
getEndRow
public org.apache.hadoop.io.Text getEndRow()
The end row of the tablet for which a volume is being chosen. Only call this when the scope is TABLE- Specified by:
getEndRow
in interfaceVolumeChooserEnvironment
- Specified by:
getEndRow
in interfaceVolumeChooserEnvironment
- Since:
- 2.0.0
-
getTable
public Optional<TableId> getTable()
- Specified by:
getTable
in interfaceVolumeChooserEnvironment
-
hasTableId
public boolean hasTableId()
- Specified by:
hasTableId
in interfaceVolumeChooserEnvironment
-
getTableId
public TableId getTableId()
- Specified by:
getTableId
in interfaceVolumeChooserEnvironment
-
getChooserScope
public VolumeChooserEnvironment.Scope getChooserScope()
- Specified by:
getChooserScope
in interfaceVolumeChooserEnvironment
-
getServiceEnv
public ServiceEnvironment getServiceEnv()
- Specified by:
getServiceEnv
in interfaceVolumeChooserEnvironment
- Specified by:
getServiceEnv
in interfaceVolumeChooserEnvironment
-
getFileSystem
public org.apache.hadoop.fs.FileSystem getFileSystem(String option)
- Specified by:
getFileSystem
in interfaceVolumeChooserEnvironment
-
-