hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From te...@apache.org
Subject hbase git commit: HBASE-16940 Address review of "Backup/Restore (HBASE-7912, HBASE-14030, HBASE-14123) mega patch" addendum (Vladimir)
Date Thu, 17 Nov 2016 20:46:41 GMT
Repository: hbase
Updated Branches:
  refs/heads/HBASE-7912 199c6350f -> c2aeb58e7


HBASE-16940 Address review of "Backup/Restore (HBASE-7912, HBASE-14030, HBASE-14123) mega
patch" addendum (Vladimir)


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/c2aeb58e
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/c2aeb58e
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/c2aeb58e

Branch: refs/heads/HBASE-7912
Commit: c2aeb58e7895220590c81c180f2493b274ce85ce
Parents: 199c635
Author: tedyu <yuzhihong@gmail.com>
Authored: Thu Nov 17 12:46:16 2016 -0800
Committer: tedyu <yuzhihong@gmail.com>
Committed: Thu Nov 17 12:46:16 2016 -0800

----------------------------------------------------------------------
 .../ClientSnapshotDescriptionUtils.java         |  2 +-
 .../apache/hadoop/hbase/backup/BackupAdmin.java | 52 ++++++++++----------
 2 files changed, 27 insertions(+), 27 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/c2aeb58e/hbase-client/src/main/java/org/apache/hadoop/hbase/snapshot/ClientSnapshotDescriptionUtils.java
----------------------------------------------------------------------
diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/snapshot/ClientSnapshotDescriptionUtils.java
b/hbase-client/src/main/java/org/apache/hadoop/hbase/snapshot/ClientSnapshotDescriptionUtils.java
index bbb878f..0a50825 100644
--- a/hbase-client/src/main/java/org/apache/hadoop/hbase/snapshot/ClientSnapshotDescriptionUtils.java
+++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/snapshot/ClientSnapshotDescriptionUtils.java
@@ -44,7 +44,7 @@ public class ClientSnapshotDescriptionUtils {
       // make sure the table name is valid, this will implicitly check validity
       TableName tableName = TableName.valueOf(snapshot.getTable());
 
-      if (tableName.isSystemTable() && !tableName.toString().equals("hbase:backup"))
{
+      if (tableName.isSystemTable() && !TableName.BACKUP_TABLE_NAME.equals(tableName))
{
         // allow hbase:backup table snapshot
         throw new IllegalArgumentException("System table snapshots are not allowed");
       }

http://git-wip-us.apache.org/repos/asf/hbase/blob/c2aeb58e/hbase-server/src/main/java/org/apache/hadoop/hbase/backup/BackupAdmin.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/backup/BackupAdmin.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/backup/BackupAdmin.java
index 2980d60..ffafb97 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/backup/BackupAdmin.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/backup/BackupAdmin.java
@@ -29,10 +29,10 @@ import org.apache.hadoop.hbase.classification.InterfaceAudience;
 import org.apache.hadoop.hbase.classification.InterfaceStability;
 import org.apache.hadoop.hbase.client.Admin;
 /**
- * The administrative API for HBase Backup. Construct an instance from 
+ * The administrative API for HBase Backup. Construct an instance from
  * {@link HBaseBackupAdmin(Connection)} and call {@link #close()} afterwards.
- * <p>BackupAdmin can be used to create backups, restore data from backups and for

- * other backup-related operations. 
+ * <p>BackupAdmin can be used to create backups, restore data from backups and for
+ * other backup-related operations.
  *
  * @see Admin
  * @since 2.0
@@ -44,31 +44,31 @@ public interface BackupAdmin extends Closeable{
 
   /**
    * Backs up given list of tables fully. Synchronous operation.
-   * 
-   * @param userRequest BackupRequest instance 
+   *
+   * @param userRequest BackupRequest instance
    * @return the backup Id
    */
-  
+
   public String backupTables(final BackupRequest userRequest) throws IOException;
-  
+
   /**
    * Backs up given list of tables fully. Asynchronous operation.
-   * 
-   * @param userRequest BackupRequest instance 
+   *
+   * @param userRequest BackupRequest instance
    * @return the backup Id future
    */
   public Future<String> backupTablesAsync(final BackupRequest userRequest) throws IOException;
 
   /**
    * Restore backup
-   * @param request - restore request
+   * @param request restore request
    * @throws IOException exception
    */
   public void restore(RestoreRequest request) throws IOException;
 
   /**
    * Restore backup
-   * @param request - restore request
+   * @param request restore request
    * @return Future which client can wait on
    * @throws IOException exception
    */
@@ -76,7 +76,7 @@ public interface BackupAdmin extends Closeable{
 
   /**
    * Describe backup image command
-   * @param backupId - backup id
+   * @param backupId backup id
    * @return backup info
    * @throws IOException exception
    */
@@ -84,7 +84,7 @@ public interface BackupAdmin extends Closeable{
 
   /**
    * Show backup progress command
-   * @param backupId - backup id (may be null)
+   * @param backupId backup id (may be null)
    * @return backup progress (0-100%), -1 if no active sessions
    *  or session not found
    * @throws IOException exception
@@ -93,7 +93,7 @@ public interface BackupAdmin extends Closeable{
 
   /**
    * Delete backup image command
-   * @param backupIds - backup id
+   * @param backupIds list of backup ids
    * @return total number of deleted sessions
    * @throws IOException exception
    */
@@ -101,7 +101,7 @@ public interface BackupAdmin extends Closeable{
 
   /**
    * Show backup history command
-   * @param n - last n backup sessions
+   * @param n last n backup sessions
    * @return list of backup infos
    * @throws IOException exception
    */
@@ -110,17 +110,17 @@ public interface BackupAdmin extends Closeable{
 
   /**
    * Show backup history command with filters
-   * @param n - last n backup sessions
-   * @param f - list of filters
+   * @param n last n backup sessions
+   * @param f list of filters
    * @return list of backup infos
    * @throws IOException exception
    */
   public List<BackupInfo> getHistory(int n, BackupInfo.Filter ... f) throws IOException;
 
-  
+
   /**
-   * Backup sets list command - list all backup sets. Backup set is 
-   * a named group of tables. 
+   * Backup sets list command - list all backup sets. Backup set is
+   * a named group of tables.
    * @return all registered backup sets
    * @throws IOException exception
    */
@@ -137,24 +137,24 @@ public interface BackupAdmin extends Closeable{
 
   /**
    * Delete backup set command
-   * @param name - backup set name
-   * @return true, if success, false - otherwise 
+   * @param name backup set name
+   * @return true, if success, false - otherwise
    * @throws IOException exception
    */
   public boolean deleteBackupSet(String name) throws IOException;
 
   /**
    * Add tables to backup set command
-   * @param name - name of backup set.
-   * @param tables - list of tables to be added to this set.
+   * @param name name of backup set.
+   * @param tables list of tables to be added to this set.
    * @throws IOException exception
    */
   public void addToBackupSet(String name, TableName[] tables) throws IOException;
 
   /**
    * Remove tables from backup set
-   * @param name - name of backup set.
-   * @param tables - list of tables to be removed from this set.
+   * @param name name of backup set.
+   * @param tables list of tables to be removed from this set.
    * @throws IOException exception
    */
   public void removeFromBackupSet(String name, String[] tables) throws IOException;


Mime
View raw message