hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anoopsamj...@apache.org
Subject hbase git commit: HBASE-13313 Skip the disabled table in mob compaction chore and MasterRpcServices.(Jingcheng)
Date Fri, 10 Apr 2015 07:57:08 GMT
Repository: hbase
Updated Branches:
  refs/heads/hbase-11339 fe389d1f1 -> eba8a708a


HBASE-13313 Skip the disabled table in mob compaction chore and MasterRpcServices.(Jingcheng)


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

Branch: refs/heads/hbase-11339
Commit: eba8a708a578e47a3fad1b1c0dbae4937c536bb9
Parents: fe389d1
Author: anoopsjohn <anoopsamjohn@gmail.com>
Authored: Fri Apr 10 13:26:47 2015 +0530
Committer: anoopsjohn <anoopsamjohn@gmail.com>
Committed: Fri Apr 10 13:26:47 2015 +0530

----------------------------------------------------------------------
 .../java/org/apache/hadoop/hbase/master/MasterRpcServices.java  | 3 +++
 .../org/apache/hadoop/hbase/master/MobFileCompactionChore.java  | 5 +++++
 2 files changed, 8 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/eba8a708/hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterRpcServices.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterRpcServices.java
b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterRpcServices.java
index 956b64f..fcc93db 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterRpcServices.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterRpcServices.java
@@ -1371,6 +1371,9 @@ public class MasterRpcServices extends RSRpcServices
    */
   private CompactRegionResponse compactMob(final CompactRegionRequest request,
     TableName tableName) throws IOException {
+    if (!master.getTableStateManager().isTableState(tableName, TableState.State.ENABLED))
{
+      throw new DoNotRetryIOException("Table " + tableName + " is not enabled");
+    }
     boolean isForceAllFiles = false;
     List<HColumnDescriptor> compactedColumns = new ArrayList<HColumnDescriptor>();
     HColumnDescriptor[] hcds = master.getTableDescriptors().get(tableName).getColumnFamilies();

http://git-wip-us.apache.org/repos/asf/hbase/blob/eba8a708/hbase-server/src/main/java/org/apache/hadoop/hbase/master/MobFileCompactionChore.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/MobFileCompactionChore.java
b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/MobFileCompactionChore.java
index 643375b..3a12725 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/MobFileCompactionChore.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/MobFileCompactionChore.java
@@ -28,6 +28,7 @@ import org.apache.hadoop.hbase.ScheduledChore;
 import org.apache.hadoop.hbase.HColumnDescriptor;
 import org.apache.hadoop.hbase.HTableDescriptor;
 import org.apache.hadoop.hbase.TableDescriptors;
+import org.apache.hadoop.hbase.client.TableState;
 import org.apache.hadoop.hbase.mob.MobConstants;
 import org.apache.hadoop.hbase.mob.MobUtils;
 
@@ -57,6 +58,10 @@ public class MobFileCompactionChore extends ScheduledChore {
       TableDescriptors htds = master.getTableDescriptors();
       Map<String, HTableDescriptor> map = htds.getAll();
       for (HTableDescriptor htd : map.values()) {
+        if (!master.getTableStateManager().isTableState(htd.getTableName(),
+          TableState.State.ENABLED)) {
+          continue;
+        }
         boolean reported = false;
         try {
           for (HColumnDescriptor hcd : htd.getColumnFamilies()) {


Mime
View raw message