|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.hadoop.hbase.procedure.ProcedureManager
org.apache.hadoop.hbase.procedure.MasterProcedureManager
org.apache.hadoop.hbase.master.snapshot.SnapshotManager
@InterfaceAudience.LimitedPrivate(value="Configuration") @InterfaceStability.Unstable public class SnapshotManager
This class manages the procedure of taking and restoring snapshots. There is only one SnapshotManager for the master.
The class provides methods for monitoring in-progress snapshot actions.
Note: Currently there can only be one snapshot being taken at a time over the cluster. This is a simplification in the current implementation.
| Field Summary | |
|---|---|
static String |
HBASE_SNAPSHOT_ENABLED
Enable or disable snapshot support |
static String |
ONLINE_SNAPSHOT_CONTROLLER_DESCRIPTION
Name of the operation to use in the controller |
| Constructor Summary | |
|---|---|
SnapshotManager()
|
|
SnapshotManager(MasterServices master,
MetricsMaster metricsMaster,
ProcedureCoordinator coordinator,
ExecutorService pool)
Fully specify all necessary components of a snapshot manager. |
|
| Methods inherited from class org.apache.hadoop.hbase.procedure.ProcedureManager |
|---|
equals, hashCode |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String HBASE_SNAPSHOT_ENABLED
public static final String ONLINE_SNAPSHOT_CONTROLLER_DESCRIPTION
| Constructor Detail |
|---|
public SnapshotManager()
public SnapshotManager(MasterServices master,
MetricsMaster metricsMaster,
ProcedureCoordinator coordinator,
ExecutorService pool)
throws IOException,
UnsupportedOperationException
master - services for the master where the manager is runningcoordinator - procedure coordinator instance. exposed for testing.pool - HBase ExecutorServcie instance, exposed for testing.
IOException
UnsupportedOperationException| Method Detail |
|---|
public List<org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.SnapshotDescription> getCompletedSnapshots()
throws IOException
IOException - File system exception
public void deleteSnapshot(org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.SnapshotDescription snapshot)
throws SnapshotDoesNotExistException,
IOException
snapshot -
SnapshotDoesNotExistException - If the specified snapshot does not exist.
IOException - For filesystem IOExceptions
public boolean isSnapshotDone(org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.SnapshotDescription expected)
throws IOException
expected -
IOException - IOException if error from HDFS or RPC
UnknownSnapshotException - if snapshot is invalid or does not exist.
public void takeSnapshot(org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.SnapshotDescription snapshot)
throws IOException
snapshot -
HBaseSnapshotException - when a snapshot specific exception occurs.
IOException - when some sort of generic IO exception occurs.
public void setSnapshotHandlerForTesting(TableName tableName,
SnapshotSentinel handler)
Exposed for TESTING
tableName - handler - handler the master should use
TODO get rid of this if possible, repackaging, modify tests.
public void restoreSnapshot(org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.SnapshotDescription reqSnapshot)
throws IOException
reqSnapshot -
IOException
public boolean isRestoreDone(org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.SnapshotDescription snapshot)
throws IOException
snapshot -
IOException - if there was a failure during the restorepublic void stop(String why)
stop in interface Stoppablepublic boolean isStopped()
isStopped in interface Stoppable
public void checkSnapshotSupport()
throws UnsupportedOperationException
UnsupportedOperationException - if snapshot are not supported
public void initialize(MasterServices master,
MetricsMaster metricsMaster)
throws org.apache.zookeeper.KeeperException,
IOException,
UnsupportedOperationException
MasterProcedureManager
initialize in class MasterProcedureManagermaster - Master service interface
org.apache.zookeeper.KeeperException
IOException
UnsupportedOperationExceptionpublic String getProcedureSignature()
ProcedureManager
getProcedureSignature in class ProcedureManager
public void execProcedure(org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.ProcedureDescription desc)
throws IOException
MasterProcedureManager
execProcedure in class MasterProcedureManagerdesc - Procedure description
IOException
public boolean isProcedureDone(org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.ProcedureDescription desc)
throws IOException
MasterProcedureManager
isProcedureDone in class MasterProcedureManagerdesc - Procedure description
IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||