Return-Path: X-Original-To: apmail-hbase-commits-archive@www.apache.org Delivered-To: apmail-hbase-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 4BE7119CAF for ; Mon, 21 Mar 2016 16:17:19 +0000 (UTC) Received: (qmail 6802 invoked by uid 500); 21 Mar 2016 16:17:16 -0000 Delivered-To: apmail-hbase-commits-archive@hbase.apache.org Received: (qmail 6720 invoked by uid 500); 21 Mar 2016 16:17:16 -0000 Mailing-List: contact commits-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@hbase.apache.org Delivered-To: mailing list commits@hbase.apache.org Received: (qmail 5727 invoked by uid 99); 21 Mar 2016 16:17:15 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 21 Mar 2016 16:17:15 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id AFFB7E0158; Mon, 21 Mar 2016 16:17:15 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: misty@apache.org To: commits@hbase.apache.org Date: Mon, 21 Mar 2016 16:17:34 -0000 Message-Id: In-Reply-To: <8ec15c3763444b808456a1e08b6c588a@git.apache.org> References: <8ec15c3763444b808456a1e08b6c588a@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [20/23] hbase-site git commit: Published site at f1d453599a944440b8a1075082e2dc7b7676416f. http://git-wip-us.apache.org/repos/asf/hbase-site/blob/a4cb7eaa/devapidocs/org/apache/hadoop/hbase/master/snapshot/SnapshotManager.html ---------------------------------------------------------------------- diff --git a/devapidocs/org/apache/hadoop/hbase/master/snapshot/SnapshotManager.html b/devapidocs/org/apache/hadoop/hbase/master/snapshot/SnapshotManager.html index 0672814..a44e15c 100644 --- a/devapidocs/org/apache/hadoop/hbase/master/snapshot/SnapshotManager.html +++ b/devapidocs/org/apache/hadoop/hbase/master/snapshot/SnapshotManager.html @@ -111,7 +111,7 @@
@InterfaceAudience.LimitedPrivate(value="Configuration")
 @InterfaceStability.Unstable
-public class SnapshotManager
+public class SnapshotManager
 extends MasterProcedureManager
 implements Stoppable
This class manages the procedure of taking and restoring snapshots. There is only one @@ -267,7 +267,7 @@ implements private void -checkAndUpdateNamespaceRegionQuota(SnapshotManifest manifest, +checkAndUpdateNamespaceRegionQuota(int updatedRegionCount, TableName tableName)  @@ -339,131 +339,135 @@ implements +private int +getRegionCountOfTable(TableName tableName)  + + void initialize(MasterServices master, MetricsMaster metricsMaster)
Initialize a globally barriered procedure for master.
- + boolean isProcedureDone(org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.ProcedureDescription desc)
Check if the procedure is finished successfully
- + boolean isRestoreDone(org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.SnapshotDescription snapshot)
Returns the status of a restore operation.
- + private boolean isRestoringTable(TableName tableName)
Verify if the restore of the specified table is in progress.
- + private boolean isSnapshotCompleted(org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.SnapshotDescription snapshot)
Check to see if the snapshot is one of the currently completed snapshots Returns true if the snapshot exists in the "completed snapshots folder".
- + boolean isSnapshotDone(org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.SnapshotDescription expected)
Check if the specified snapshot is done
- + boolean isStopped()  - + (package private) boolean isTakingSnapshot(org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.SnapshotDescription snapshot)
Check to see if there is a snapshot in progress with the same name or on the same table.
- + (package private) boolean isTakingSnapshot(TableName tableName)
Check to see if the specified table has a snapshot in progress.
- + private void prepareToTakeSnapshot(org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.SnapshotDescription snapshot)
Check to make sure that we are OK to run the passed snapshot.
- + private SnapshotSentinel removeSentinelIfFinished(Map<TableName,SnapshotSentinel> sentinels, org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.SnapshotDescription snapshot)
Return the handler if it is currently live and has the same snapshot target name.
- + (package private) void resetTempDir()
Cleans up any snapshots in the snapshot/.tmp directory that were left from failed snapshot attempts.
- + void restoreSnapshot(org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.SnapshotDescription reqSnapshot)
Restore the specified snapshot
- + private void restoreSnapshot(org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.SnapshotDescription snapshot, HTableDescriptor hTableDescriptor)
Restore the specified snapshot.
- + void setSnapshotHandlerForTesting(TableName tableName, SnapshotSentinel handler)
Set the handler for the current snapshot
- + private void snapshotDisabledTable(org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.SnapshotDescription snapshot)
Take a snapshot of a disabled table.
- + private void snapshotEnabledTable(org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.SnapshotDescription snapshot)
Take a snapshot of an enabled table.
- + private void snapshotTable(org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.SnapshotDescription snapshot, TakeSnapshotHandler handler)
Take a snapshot using the specified handler.
- + void stop(String why)
Stop this service.
- + void takeSnapshot(org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.SnapshotDescription snapshot)
Take a snapshot based on the enabled/disabled state of the table.
- + private org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.SnapshotDescription toSnapshotDescription(org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.ProcedureDescription desc)  @@ -509,7 +513,7 @@ implements
  • LOG

    -
    private static final org.apache.commons.logging.Log LOG
    +
    private static final org.apache.commons.logging.Log LOG
  • @@ -518,7 +522,7 @@ implements
  • SNAPSHOT_WAKE_MILLIS_DEFAULT

    -
    private static final int SNAPSHOT_WAKE_MILLIS_DEFAULT
    +
    private static final int SNAPSHOT_WAKE_MILLIS_DEFAULT
    By default, check to see if the snapshot is complete every WAKE MILLIS (ms)
    See Also:
    Constant Field Values
  • @@ -529,7 +533,7 @@ implements
  • SNAPSHOT_SENTINELS_CLEANUP_TIMEOUT

    -
    private static final int SNAPSHOT_SENTINELS_CLEANUP_TIMEOUT
    +
    private static final int SNAPSHOT_SENTINELS_CLEANUP_TIMEOUT
    Wait time before removing a finished sentinel from the in-progress map NOTE: This is used as a safety auto cleanup. @@ -548,7 +552,7 @@ implements
  • HBASE_SNAPSHOT_ENABLED

    -
    public static final String HBASE_SNAPSHOT_ENABLED
    +
    public static final String HBASE_SNAPSHOT_ENABLED
    Enable or disable snapshot support
    See Also:
    Constant Field Values
  • @@ -559,7 +563,7 @@ implements
  • SNAPSHOT_WAKE_MILLIS_KEY

    -
    private static final String SNAPSHOT_WAKE_MILLIS_KEY
    +
    private static final String SNAPSHOT_WAKE_MILLIS_KEY
    Conf key for # of ms elapsed between checks for snapshot errors while waiting for completion.
    See Also:
    Constant Field Values
    @@ -571,7 +575,7 @@ implements
  • ONLINE_SNAPSHOT_CONTROLLER_DESCRIPTION

    -
    public static final String ONLINE_SNAPSHOT_CONTROLLER_DESCRIPTION
    +
    public static final String ONLINE_SNAPSHOT_CONTROLLER_DESCRIPTION
    Name of the operation to use in the controller
    See Also:
    Constant Field Values
  • @@ -582,7 +586,7 @@ implements
  • SNAPSHOT_POOL_THREADS_KEY

    -
    private static final String SNAPSHOT_POOL_THREADS_KEY
    +
    private static final String SNAPSHOT_POOL_THREADS_KEY
    Conf key for # of threads used by the SnapshotManager thread pool
    See Also:
    Constant Field Values
  • @@ -593,7 +597,7 @@ implements
  • SNAPSHOT_POOL_THREADS_DEFAULT

    -
    private static final int SNAPSHOT_POOL_THREADS_DEFAULT
    +
    private static final int SNAPSHOT_POOL_THREADS_DEFAULT
    number of current operations running on the master
    See Also:
    Constant Field Values
  • @@ -604,7 +608,7 @@ implements
  • stopped

    -
    private boolean stopped
    +
    private boolean stopped
  • @@ -613,7 +617,7 @@ implements
  • master

    -
    private MasterServices master
    +
    private MasterServices master
  • @@ -622,7 +626,7 @@ implements
  • coordinator

    -
    private ProcedureCoordinator coordinator
    +
    private ProcedureCoordinator coordinator
  • @@ -631,7 +635,7 @@ implements
  • isSnapshotSupported

    -
    private boolean isSnapshotSupported
    +
    private boolean isSnapshotSupported
  • @@ -640,7 +644,7 @@ implements
  • snapshotHandlers

    -
    private Map<TableName,SnapshotSentinel> snapshotHandlers
    +
    private Map<TableName,SnapshotSentinel> snapshotHandlers
  • @@ -649,7 +653,7 @@ implements
  • restoreHandlers

    -
    private Map<TableName,SnapshotSentinel> restoreHandlers
    +
    private Map<TableName,SnapshotSentinel> restoreHandlers
  • @@ -658,7 +662,7 @@ implements
  • rootDir

    -
    private org.apache.hadoop.fs.Path rootDir
    +
    private org.apache.hadoop.fs.Path rootDir
  • @@ -667,7 +671,7 @@ implements
  • executorService

    -
    private ExecutorService executorService
    +
    private ExecutorService executorService
  • @@ -684,7 +688,7 @@ implements
  • SnapshotManager

    -
    public SnapshotManager()
    +
    public SnapshotManager()
  • @@ -693,7 +697,7 @@ implements
  • SnapshotManager

    -
    public SnapshotManager(MasterServices master,
    +
    public SnapshotManager(MasterServices master,
                    MetricsMaster metricsMaster,
                    ProcedureCoordinator coordinator,
                    ExecutorService pool)
    @@ -720,7 +724,7 @@ implements 
     
  • getCompletedSnapshots

    -
    public List<org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.SnapshotDescription> getCompletedSnapshots()
    +
    public List<org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.SnapshotDescription> getCompletedSnapshots()
                                                                                                            throws IOException
    Gets the list of all completed snapshots.
    Returns:
    list of SnapshotDescriptions
    @@ -734,7 +738,7 @@ implements
  • getCompletedSnapshots

    -
    private List<org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.SnapshotDescription> getCompletedSnapshots(org.apache.hadoop.fs.Path snapshotDir)
    +
    private List<org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.SnapshotDescription> getCompletedSnapshots(org.apache.hadoop.fs.Path snapshotDir)
                                                                                                             throws IOException
    Gets the list of all completed snapshots.
    Parameters:
    snapshotDir - snapshot directory
    @@ -749,7 +753,7 @@ implements
  • resetTempDir

    -
    void resetTempDir()
    +
    void resetTempDir()
                 throws IOException
    Cleans up any snapshots in the snapshot/.tmp directory that were left from failed snapshot attempts.
    @@ -763,7 +767,7 @@ implements
  • deleteSnapshot

    -
    public void deleteSnapshot(org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.SnapshotDescription snapshot)
    +
    public void deleteSnapshot(org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.SnapshotDescription snapshot)
                         throws SnapshotDoesNotExistException,
                                IOException
    Delete the specified snapshot
    @@ -779,7 +783,7 @@ implements
  • isSnapshotDone

    -
    public boolean isSnapshotDone(org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.SnapshotDescription expected)
    +
    public boolean isSnapshotDone(org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.SnapshotDescription expected)
                            throws IOException
    Check if the specified snapshot is done
    Parameters:
    expected -
    @@ -795,7 +799,7 @@ implements
  • isTakingSnapshot

    -
    boolean isTakingSnapshot(org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.SnapshotDescription snapshot)
    +
    boolean isTakingSnapshot(org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.SnapshotDescription snapshot)
    Check to see if there is a snapshot in progress with the same name or on the same table. Currently we have a limitation only allowing a single snapshot per table at a time. Also we don't allow snapshot with the same name.
    @@ -810,7 +814,7 @@ implements
  • isTakingSnapshot

    -
    boolean isTakingSnapshot(TableName tableName)
    +
    boolean isTakingSnapshot(TableName tableName)
    Check to see if the specified table has a snapshot in progress. Currently we have a limitation only allowing a single snapshot per table at a time.
    Parameters:
    tableName - name of the table being snapshotted.
    @@ -823,7 +827,7 @@ implements
  • prepareToTakeSnapshot

    -
    private void prepareToTakeSnapshot(org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.SnapshotDescription snapshot)
    +
    private void prepareToTakeSnapshot(org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.SnapshotDescription snapshot)
                                 throws HBaseSnapshotException
    Check to make sure that we are OK to run the passed snapshot. Checks to make sure that we aren't already running a snapshot or restore on the requested table.
    @@ -838,7 +842,7 @@ implements
  • snapshotDisabledTable

    -
    private void snapshotDisabledTable(org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.SnapshotDescription snapshot)
    +
    private void snapshotDisabledTable(org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.SnapshotDescription snapshot)
                                 throws HBaseSnapshotException
    Take a snapshot of a disabled table.
    Parameters:
    snapshot - description of the snapshot to take. Modified to be HBaseProtos.SnapshotDescription.Type.DISABLED.
    @@ -852,7 +856,7 @@ implements
  • snapshotEnabledTable

    -
    private void snapshotEnabledTable(org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.SnapshotDescription snapshot)
    +
    private void snapshotEnabledTable(org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.SnapshotDescription snapshot)
                                throws HBaseSnapshotException
    Take a snapshot of an enabled table.
    Parameters:
    snapshot - description of the snapshot to take.
    @@ -866,7 +870,7 @@ implements
  • snapshotTable

    -
    private void snapshotTable(org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.SnapshotDescription snapshot,
    +
    private void snapshotTable(org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.SnapshotDescription snapshot,
                      TakeSnapshotHandler handler)
                         throws HBaseSnapshotException
    Take a snapshot using the specified handler. @@ -884,7 +888,7 @@ implements
  • takeSnapshot

    -
    public void takeSnapshot(org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.SnapshotDescription snapshot)
    +
    public void takeSnapshot(org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.SnapshotDescription snapshot)
                       throws IOException
    Take a snapshot based on the enabled/disabled state of the table.
    Parameters:
    snapshot -
    @@ -899,7 +903,7 @@ implements
  • setSnapshotHandlerForTesting

    -
    public void setSnapshotHandlerForTesting(TableName tableName,
    +
    public void setSnapshotHandlerForTesting(TableName tableName,
                                     SnapshotSentinel handler)
    Set the handler for the current snapshot

    @@ -915,7 +919,7 @@ implements

  • getCoordinator

    -
    ProcedureCoordinator getCoordinator()
    +
    ProcedureCoordinator getCoordinator()
    Returns:
    distributed commit coordinator for all running snapshots
  • @@ -925,7 +929,7 @@ implements
  • isSnapshotCompleted

    -
    private boolean isSnapshotCompleted(org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.SnapshotDescription snapshot)
    +
    private boolean isSnapshotCompleted(org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.SnapshotDescription snapshot)
                                  throws IOException
    Check to see if the snapshot is one of the currently completed snapshots Returns true if the snapshot exists in the "completed snapshots folder".
    @@ -943,7 +947,7 @@ implements
  • cloneSnapshot

    -
    void cloneSnapshot(org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.SnapshotDescription snapshot,
    +
    void cloneSnapshot(org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.SnapshotDescription snapshot,
                      HTableDescriptor hTableDescriptor)
                  throws HBaseSnapshotException
    Clone the specified snapshot into a new table. @@ -959,7 +963,7 @@ implements
  • restoreSnapshot

    -
    public void restoreSnapshot(org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.SnapshotDescription reqSnapshot)
    +
    public void restoreSnapshot(org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.SnapshotDescription reqSnapshot)
                          throws IOException
    Restore the specified snapshot
    Parameters:
    reqSnapshot -
    @@ -973,33 +977,46 @@ implements
  • checkAndUpdateNamespaceQuota

    -
    private void checkAndUpdateNamespaceQuota(SnapshotManifest manifest,
    +
    private void checkAndUpdateNamespaceQuota(SnapshotManifest manifest,
                                     TableName tableName)
                                        throws IOException
    Throws:
    IOException
  • - + + + + + + + + +
      +
    • +

      getRegionCountOfTable

      +
      public int getRegionCountOfTable(TableName tName)
      +                          throws IOException
      +
      Get region count for table
      +
      Parameters:
      tName - - table name
      +
      Returns:
      cached region count, or -1 if table status not found
      +
      Throws:
      +
      IOException - Signals that the namespace auditor has not been initialized
      +
    • +