hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From apurt...@apache.org
Subject [1/3] hbase git commit: Revert "HBASE-12454 Setting didPerformCompaction early in HRegion#compact"
Date Wed, 12 Nov 2014 20:31:17 GMT
Repository: hbase
Updated Branches:
  refs/heads/0.98 879be4c96 -> 6ab844851
  refs/heads/branch-1 17e2de349 -> d0c34fb4a
  refs/heads/master 05c166339 -> 210f5a3b0


Revert "HBASE-12454 Setting didPerformCompaction early in HRegion#compact"

This reverts commit b0a434a5ce4aac1bc6e50ebf7c58f0e65052caae.


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

Branch: refs/heads/master
Commit: 210f5a3b01e67287c1120d15402a52eb158ddc33
Parents: 05c1663
Author: Andrew Purtell <apurtell@apache.org>
Authored: Wed Nov 12 12:30:57 2014 -0800
Committer: Andrew Purtell <apurtell@apache.org>
Committed: Wed Nov 12 12:30:57 2014 -0800

----------------------------------------------------------------------
 .../main/java/org/apache/hadoop/hbase/regionserver/HRegion.java  | 2 +-
 .../main/java/org/apache/hadoop/hbase/regionserver/HStore.java   | 4 +---
 .../org/apache/hadoop/hbase/regionserver/TestCompaction.java     | 3 ---
 3 files changed, 2 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/210f5a3b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
index 0e093ea..fbf151a 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
@@ -1565,8 +1565,8 @@ public class HRegion implements HeapSize, PropagatingConfigurationObserver
{ //
         doRegionCompactionPrep();
         try {
           status.setStatus("Compacting store " + store);
-          store.compact(compaction);
           didPerformCompaction = true;
+          store.compact(compaction);
         } catch (InterruptedIOException iioe) {
           String msg = "compaction interrupted";
           LOG.info(msg, iioe);

http://git-wip-us.apache.org/repos/asf/hbase/blob/210f5a3b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HStore.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HStore.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HStore.java
index 16c797c..8b41401 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HStore.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HStore.java
@@ -1544,9 +1544,7 @@ public class HStore implements Store {
 
   @Override
   public void cancelRequestedCompaction(CompactionContext compaction) {
-    if (compaction != null) {
-      finishCompactionRequest(compaction.getRequest());
-    }
+    finishCompactionRequest(compaction.getRequest());
   }
 
   private void finishCompactionRequest(CompactionRequest cr) {

http://git-wip-us.apache.org/repos/asf/hbase/blob/210f5a3b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestCompaction.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestCompaction.java
b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestCompaction.java
index 0a1d8b8..4900ef4 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestCompaction.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestCompaction.java
@@ -161,9 +161,6 @@ public class TestCompaction {
       }).when(spyR).doRegionCompactionPrep();
 
       // force a minor compaction, but not before requesting a stop
-
-      // Accounting: Normally compaction requests go through HStore#requestCompaction
-      r.reportCompactionRequestStart(false);      
       spyR.compactStores();
 
       // ensure that the compaction stopped, all old files are intact,


Mime
View raw message