hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zhang...@apache.org
Subject hbase git commit: HBASE-18949 Remove the CompactionRequest parameter in preCompactSelection
Date Tue, 10 Oct 2017 01:41:54 GMT
Repository: hbase
Updated Branches:
  refs/heads/master 54da4405d -> c3b3fd788


HBASE-18949 Remove the CompactionRequest parameter in preCompactSelection

Signed-off-by: zhangduo <zhangduo@apache.org>


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

Branch: refs/heads/master
Commit: c3b3fd78888b8fd51f0dd1864a8cb618f88be16a
Parents: 54da440
Author: Peter Somogyi <psomogyi@cloudera.com>
Authored: Thu Oct 5 09:59:28 2017 -0700
Committer: zhangduo <zhangduo@apache.org>
Committed: Tue Oct 10 09:41:21 2017 +0800

----------------------------------------------------------------------
 .../org/apache/hadoop/hbase/coprocessor/RegionObserver.java    | 6 ++----
 .../main/java/org/apache/hadoop/hbase/regionserver/HStore.java | 2 +-
 .../hadoop/hbase/regionserver/RegionCoprocessorHost.java       | 6 ++----
 .../apache/hadoop/hbase/coprocessor/SimpleRegionObserver.java  | 3 +--
 .../apache/hadoop/hbase/mob/compactions/TestMobCompactor.java  | 4 +---
 5 files changed, 7 insertions(+), 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/c3b3fd78/hbase-server/src/main/java/org/apache/hadoop/hbase/coprocessor/RegionObserver.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/coprocessor/RegionObserver.java
b/hbase-server/src/main/java/org/apache/hadoop/hbase/coprocessor/RegionObserver.java
index cbd6e4b..a1e4f0e 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/coprocessor/RegionObserver.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/coprocessor/RegionObserver.java
@@ -28,7 +28,6 @@ import org.apache.hadoop.fs.FileSystem;
 import org.apache.hadoop.fs.Path;
 import org.apache.hadoop.hbase.Cell;
 import org.apache.hadoop.hbase.CompareOperator;
-import org.apache.hadoop.hbase.Coprocessor;
 import org.apache.hadoop.hbase.HBaseInterfaceAudience;
 import org.apache.hadoop.hbase.client.Append;
 import org.apache.hadoop.hbase.client.Delete;
@@ -188,11 +187,10 @@ public interface RegionObserver {
    * @param store the store where compaction is being requested
    * @param candidates the store files currently available for compaction
    * @param tracker tracker used to track the life cycle of a compaction
-   * @param request the requested compaction
    */
   default void preCompactSelection(ObserverContext<RegionCoprocessorEnvironment> c,
Store store,
-      List<? extends StoreFile> candidates, CompactionLifeCycleTracker tracker,
-      CompactionRequest request) throws IOException {}
+      List<? extends StoreFile> candidates, CompactionLifeCycleTracker tracker)
+      throws IOException {}
 
   /**
    * Called after the {@link StoreFile}s to compact have been selected from the available

http://git-wip-us.apache.org/repos/asf/hbase/blob/c3b3fd78/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 d8e82bb..d2009e3 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
@@ -1666,7 +1666,7 @@ public class HStore implements Store, HeapSize, StoreConfigInformation,
Propagat
           boolean override = false;
           //TODO: is it correct way to get CompactionRequest?
           override = getCoprocessorHost().preCompactSelection(this, candidatesForCoproc,
-            tracker, null, user);
+            tracker, user);
           if (override) {
             // Coprocessor is overriding normal file selection.
             compaction.forceSelect(new CompactionRequestImpl(candidatesForCoproc));

http://git-wip-us.apache.org/repos/asf/hbase/blob/c3b3fd78/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RegionCoprocessorHost.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RegionCoprocessorHost.java
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RegionCoprocessorHost.java
index b76980d..035c8d1 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RegionCoprocessorHost.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RegionCoprocessorHost.java
@@ -569,18 +569,16 @@ public class RegionCoprocessorHost
    * @param store The store where compaction is being requested
    * @param candidates The currently available store files
    * @param tracker used to track the life cycle of a compaction
-   * @param request the compaction request
    * @param user the user
    * @return If {@code true}, skip the normal selection process and use the current list
    * @throws IOException
    */
   public boolean preCompactSelection(final HStore store, final List<HStoreFile> candidates,
-      final CompactionLifeCycleTracker tracker, final CompactionRequest request,
-      final User user) throws IOException {
+      final CompactionLifeCycleTracker tracker, final User user) throws IOException {
     return execOperation(coprocEnvironments.isEmpty() ? null : new RegionObserverOperation(user)
{
       @Override
       public void call(RegionObserver observer) throws IOException {
-        observer.preCompactSelection(this, store, candidates, tracker, request);
+        observer.preCompactSelection(this, store, candidates, tracker);
       }
     });
   }

http://git-wip-us.apache.org/repos/asf/hbase/blob/c3b3fd78/hbase-server/src/test/java/org/apache/hadoop/hbase/coprocessor/SimpleRegionObserver.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/coprocessor/SimpleRegionObserver.java
b/hbase-server/src/test/java/org/apache/hadoop/hbase/coprocessor/SimpleRegionObserver.java
index 71ea6ff..ee94645 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/coprocessor/SimpleRegionObserver.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/coprocessor/SimpleRegionObserver.java
@@ -203,8 +203,7 @@ public class SimpleRegionObserver implements RegionCoprocessor, RegionObserver
{
 
   @Override
   public void preCompactSelection(ObserverContext<RegionCoprocessorEnvironment> c,
Store store,
-      List<? extends StoreFile> candidates, CompactionLifeCycleTracker tracker,
-      CompactionRequest request) throws IOException {
+      List<? extends StoreFile> candidates, CompactionLifeCycleTracker tracker) throws
IOException {
     ctPreCompactSelect.incrementAndGet();
   }
 

http://git-wip-us.apache.org/repos/asf/hbase/blob/c3b3fd78/hbase-server/src/test/java/org/apache/hadoop/hbase/mob/compactions/TestMobCompactor.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/mob/compactions/TestMobCompactor.java
b/hbase-server/src/test/java/org/apache/hadoop/hbase/mob/compactions/TestMobCompactor.java
index 7add5d2..e0d9fa2 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/mob/compactions/TestMobCompactor.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/mob/compactions/TestMobCompactor.java
@@ -89,7 +89,6 @@ import org.apache.hadoop.hbase.regionserver.Store;
 import org.apache.hadoop.hbase.regionserver.StoreFile;
 import org.apache.hadoop.hbase.regionserver.StoreFileInfo;
 import org.apache.hadoop.hbase.regionserver.compactions.CompactionLifeCycleTracker;
-import org.apache.hadoop.hbase.regionserver.compactions.CompactionRequest;
 import org.apache.hadoop.hbase.security.EncryptionUtil;
 import org.apache.hadoop.hbase.security.User;
 import org.apache.hadoop.hbase.testclassification.LargeTests;
@@ -731,8 +730,7 @@ public class TestMobCompactor {
 
     @Override
     public void preCompactSelection(ObserverContext<RegionCoprocessorEnvironment> c,
Store store,
-        List<? extends StoreFile> candidates, CompactionLifeCycleTracker tracker,
-        CompactionRequest request)
+        List<? extends StoreFile> candidates, CompactionLifeCycleTracker tracker)
         throws IOException {
       int count = candidates.size();
       if (count >= 2) {


Mime
View raw message