hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From st...@apache.org
Subject [3/3] hbase git commit: HBASE-14998 Unify synchronous and asynchronous methods in Admin and cleanup
Date Thu, 14 Sep 2017 00:20:06 GMT
HBASE-14998 Unify synchronous and asynchronous methods in Admin and cleanup

This is based on patch sent me by Balazs Meszaros. The good stuff in
here is from him. This patch does less than his ambition. It changes
Admin class only. Can work on making AsyncAdmin cohere in a follow-on.

 * Deprecates getAlterStatus. Everywhere else we talk of 'modify' rather
   'alter' and should use Future returned from async instead.
 * isTableAvailable(TableName, byte [][]) has been deprecated to be
   removed; use the overrie instead. This is a weird method.
 * Changed listTableDescriptor to getDescriptor.
 * Renamed other like methods to have same pattern (deprecating the old):
    balancer => balance
    setBalancerRunning => balancerSwitch
    setNormalizerRunning => normalizerSwitch
    enableCatalogJanitor => catalogJanitorSwitch
    setCleanerChoreRunning => cleanerChoreSwitch
    setSplitOrMergeEnabled => splitOrMergeEnabledSwitch

 * Renamed (with deprecation of old) runCatalogScan => runCatalogJanitor.
 * Reviewed generated javadoc and made some edits; purged reference to
   hbase issues from our API, fixed param names, etc.
 * Made all the enable services methods have same pattern.
 * Renamed takeSnapshotAsync as snapshotAsync (with deprecation of old)
 * Renamed execProcedureWithRet as execProcedureWithReturn (with
   deprecation)

Signed-off-by: Michael Stack <stack@apache.org>


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

Branch: refs/heads/branch-2
Commit: 274bbb64c6ffc588527bec2fc38d1f73f2d2d39d
Parents: 62db6bf
Author: Michael Stack <stack@apache.org>
Authored: Tue Sep 12 18:36:17 2017 -0700
Committer: Michael Stack <stack@apache.org>
Committed: Wed Sep 13 17:19:56 2017 -0700

----------------------------------------------------------------------
 .../hadoop/hbase/backup/util/RestoreTool.java   |   2 +-
 .../org/apache/hadoop/hbase/client/Admin.java   | 803 ++++++++++++-------
 .../apache/hadoop/hbase/client/HBaseAdmin.java  |  26 +-
 .../hbase/IntegrationTestDDLMasterFailover.java |  14 +-
 .../hadoop/hbase/chaos/actions/Action.java      |   2 +-
 .../hbase/chaos/actions/RemoveColumnAction.java |   2 +-
 .../hadoop/hbase/mapreduce/CopyTable.java       |   2 +-
 .../hadoop/hbase/mob/ExpiredMobFileCleaner.java |   2 +-
 .../TestHColumnDescriptorDefaultVersions.java   |   2 +-
 .../hbase/client/TestReplicaWithCluster.java    |   6 +-
 10 files changed, 522 insertions(+), 339 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/274bbb64/hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/util/RestoreTool.java
----------------------------------------------------------------------
diff --git a/hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/util/RestoreTool.java
b/hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/util/RestoreTool.java
index c2f1939..ca0d026 100644
--- a/hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/util/RestoreTool.java
+++ b/hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/util/RestoreTool.java
@@ -177,7 +177,7 @@ public class RestoreTool {
         LOG.debug("Found descriptor " + tableDescriptor + " through " + incrBackupId);
 
         TableName newTableName = newTableNames[i];
-        TableDescriptor newTableDescriptor = admin.listTableDescriptor(newTableName);
+        TableDescriptor newTableDescriptor = admin.getDescriptor(newTableName);
         List<ColumnFamilyDescriptor> families = Arrays.asList(tableDescriptor.getColumnFamilies());
         List<ColumnFamilyDescriptor> existingFamilies =
             Arrays.asList(newTableDescriptor.getColumnFamilies());


Mime
View raw message