hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From te...@apache.org
Subject [6/6] hbase git commit: HBASE-14123 HBase Backup/Restore Phase 2 (Vladimir Rodionov)
Date Fri, 22 Apr 2016 16:15:15 GMT
HBASE-14123 HBase Backup/Restore Phase 2 (Vladimir Rodionov)


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

Branch: refs/heads/HBASE-7912
Commit: c61f7c3424566d4479a7741a7e140e82502f6f9f
Parents: 0ca8655
Author: tedyu <yuzhihong@gmail.com>
Authored: Fri Apr 22 09:14:49 2016 -0700
Committer: tedyu <yuzhihong@gmail.com>
Committed: Fri Apr 22 09:14:49 2016 -0700

----------------------------------------------------------------------
 .../apache/hadoop/hbase/client/HBaseAdmin.java  |    8 +-
 .../hbase/protobuf/generated/BackupProtos.java  | 1214 ++++++++----------
 hbase-protocol/src/main/protobuf/Backup.proto   |   18 +-
 .../hadoop/hbase/backup/BackupClient.java       |  108 ++
 .../hadoop/hbase/backup/BackupDriver.java       |   51 +-
 .../apache/hadoop/hbase/backup/BackupInfo.java  |  483 +++++++
 .../hbase/backup/BackupRestoreFactory.java      |   23 +-
 .../hadoop/hbase/backup/BackupStatus.java       |  103 ++
 .../hadoop/hbase/backup/HBackupFileSystem.java  |   20 +-
 .../hadoop/hbase/backup/RestoreDriver.java      |   60 +-
 .../hbase/backup/impl/BackupClientImpl.java     |  231 ++++
 .../hbase/backup/impl/BackupCommands.java       |  450 ++++++-
 .../hbase/backup/impl/BackupCopyService.java    |   21 +-
 .../hbase/backup/impl/BackupException.java      |    9 +-
 .../hadoop/hbase/backup/impl/BackupManager.java |  155 ++-
 .../hbase/backup/impl/BackupManifest.java       |   68 +-
 .../backup/impl/BackupRestoreConstants.java     |    3 +-
 .../hbase/backup/impl/BackupSystemTable.java    |  436 +++++--
 .../backup/impl/BackupSystemTableHelper.java    |  270 ++--
 .../hadoop/hbase/backup/impl/BackupUtil.java    |  184 ++-
 .../backup/impl/IncrementalBackupManager.java   |   75 +-
 .../backup/impl/IncrementalRestoreService.java  |   10 +-
 .../hbase/backup/impl/RestoreClientImpl.java    |  164 ++-
 .../hadoop/hbase/backup/impl/RestoreUtil.java   |   17 +-
 .../mapreduce/MapReduceBackupCopyService.java   |   50 +-
 .../mapreduce/MapReduceRestoreService.java      |  100 +-
 .../hbase/backup/master/BackupController.java   |   56 +
 .../hbase/backup/master/BackupLogCleaner.java   |    9 +-
 .../backup/master/FullTableBackupProcedure.java |  751 +++++++++++
 .../master/IncrementalTableBackupProcedure.java |  331 +++++
 .../master/LogRollMasterProcedureManager.java   |   10 +-
 .../regionserver/LogRollBackupSubprocedure.java |   10 +-
 .../LogRollRegionServerProcedureManager.java    |    6 +-
 .../hadoop/hbase/backup/util/BackupSet.java     |   62 +
 .../hadoop/hbase/mapreduce/WALInputFormat.java  |   30 +-
 .../hadoop/hbase/mapreduce/WALPlayer.java       |   36 +-
 .../org/apache/hadoop/hbase/master/HMaster.java |   15 +-
 .../hbase/regionserver/HRegionServer.java       |    3 +-
 .../hadoop/hbase/backup/TestBackupBase.java     |   79 +-
 .../hbase/backup/TestBackupBoundaryTests.java   |    2 -
 .../hadoop/hbase/backup/TestBackupDelete.java   |   96 ++
 .../hadoop/hbase/backup/TestBackupDescribe.java |   97 ++
 .../hbase/backup/TestBackupLogCleaner.java      |   15 +-
 .../hbase/backup/TestBackupShowHistory.java     |   92 ++
 .../hbase/backup/TestBackupStatusProgress.java  |   98 ++
 .../hbase/backup/TestBackupSystemTable.java     |  271 +++-
 .../hadoop/hbase/backup/TestFullBackup.java     |   73 ++
 .../hadoop/hbase/backup/TestFullBackupSet.java  |   85 ++
 .../hadoop/hbase/backup/TestFullRestore.java    |  166 +++
 .../hbase/backup/TestIncrementalBackup.java     |    7 +-
 .../backup/TestIncrementalBackupNoDataLoss.java |  124 ++
 .../hadoop/hbase/backup/TestRemoteBackup.java   |    4 +
 .../hadoop/hbase/backup/TestRemoteRestore.java  |    2 -
 .../hbase/backup/TestRestoreBoundaryTests.java  |    1 -
 54 files changed, 5455 insertions(+), 1407 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/c61f7c34/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java
----------------------------------------------------------------------
diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java
index f19da53..3cc846c 100644
--- a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java
+++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java
@@ -217,6 +217,7 @@ public class HBaseAdmin implements Admin {
   // want to wait a long time.
   private final int retryLongerMultiplier;
   private final int syncWaitTimeout;
+  private final long backupWaitTimeout;
   private boolean aborted;
   private int operationTimeout;
 
@@ -243,7 +244,8 @@ public class HBaseAdmin implements Admin {
         HConstants.DEFAULT_HBASE_CLIENT_OPERATION_TIMEOUT);
     this.syncWaitTimeout = this.conf.getInt(
       "hbase.client.sync.wait.timeout.msec", 10 * 60000); // 10min
-
+    this.backupWaitTimeout = this.conf.getInt(
+      "hbase.client.backup.wait.timeout.sec", 24 * 3600); // 24 h
     this.rpcCallerFactory = RpcRetryingCallerFactory.instantiate(this.conf);
 
     this.ng = this.connection.getNonceGenerator();
@@ -1591,8 +1593,8 @@ public class HBaseAdmin implements Admin {
   public String backupTables(final BackupRequest userRequest) throws IOException {
     return get(
       backupTablesAsync(userRequest),
-      syncWaitTimeout,
-      TimeUnit.MILLISECONDS);
+      backupWaitTimeout,
+      TimeUnit.SECONDS);
   }
 
   public static class TableBackupFuture extends TableFuture<String> {


Mime
View raw message