Class AbstractReadOnlyController
java.lang.Object
org.apache.hadoop.hbase.security.access.AbstractReadOnlyController
- All Implemented Interfaces:
Coprocessor
- Direct Known Subclasses:
BulkLoadReadOnlyController,EndpointReadOnlyController,MasterReadOnlyController,RegionReadOnlyController,RegionServerReadOnlyController
@LimitedPrivate("Configuration")
public abstract class AbstractReadOnlyController
extends Object
implements Coprocessor
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.hadoop.hbase.Coprocessor
Coprocessor.State -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final org.slf4j.LoggerFields inherited from interface org.apache.hadoop.hbase.Coprocessor
PRIORITY_HIGHEST, PRIORITY_LOWEST, PRIORITY_SYSTEM, PRIORITY_USER, VERSION -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidstatic booleanisAnotherClusterActive(org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path rootDir, ActiveClusterSuffix localClusterSuffix) Checks whether another cluster is currently active on this storage location by reading the "active.cluster.suffix.id" file on the filesystem.static booleanstatic booleanisWritableInReadOnlyMode(TableName tableName) static voidmanageActiveClusterIdFile(boolean readOnlyEnabled, MasterFileSystem mfs) voidCalled by theCoprocessorEnvironmentduring it's own startup to initialize the coprocessor.voidCalled by theCoprocessorEnvironmentduring it's own shutdown to stop the coprocessor.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.hadoop.hbase.Coprocessor
getServices
-
Field Details
-
LOG
-
writableTables
-
-
Constructor Details
-
AbstractReadOnlyController
public AbstractReadOnlyController()
-
-
Method Details
-
isWritableInReadOnlyMode
public static boolean isWritableInReadOnlyMode(ObserverContext<? extends RegionCoprocessorEnvironment> c) -
isWritableInReadOnlyMode
-
internalReadOnlyGuard
-
start
Description copied from interface:CoprocessorCalled by theCoprocessorEnvironmentduring it's own startup to initialize the coprocessor.- Specified by:
startin interfaceCoprocessor- Throws:
IOException
-
stop
Description copied from interface:CoprocessorCalled by theCoprocessorEnvironmentduring it's own shutdown to stop the coprocessor.- Specified by:
stopin interfaceCoprocessor
-
isAnotherClusterActive
public static boolean isAnotherClusterActive(org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path rootDir, ActiveClusterSuffix localClusterSuffix) Checks whether another cluster is currently active on this storage location by reading the "active.cluster.suffix.id" file on the filesystem.- Parameters:
fs- the filesystem to read fromrootDir- the HBase root directorylocalClusterSuffix- the local cluster's ActiveClusterSuffix identity- Returns:
- true if the active cluster file exists and belongs to a different cluster; false if the file does not exist or belongs to this cluster
-
manageActiveClusterIdFile
-