[35/50] [abbrv] hbase git commit: HBASE-18989 Polish the compaction related CP hooks

2017-10-23 Thread zhangduo
HBASE-18989 Polish the compaction related CP hooks


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

Branch: refs/heads/HBASE-18410
Commit: c9fdbec772fe7dea06644d86e2854b98047ac9da
Parents: 4add40c
Author: zhangduo 
Authored: Mon Oct 23 16:44:54 2017 +0800
Committer: zhangduo 
Committed: Mon Oct 23 16:44:54 2017 +0800

--
 .../hbase/coprocessor/RegionObserver.java   |  23 +-
 .../hadoop/hbase/regionserver/CompactSplit.java | 101 +--
 .../hadoop/hbase/regionserver/HRegion.java  |  34 ++-
 .../hbase/regionserver/HRegionServer.java   |  10 +-
 .../hadoop/hbase/regionserver/HStore.java   |   5 +-
 .../hbase/regionserver/RSRpcServices.java   |  47 +---
 .../hadoop/hbase/regionserver/Region.java   |  19 +-
 .../regionserver/RegionServerServices.java  |  10 +-
 .../apache/hadoop/hbase/regionserver/Store.java |   7 -
 .../compactions/CompactionLifeCycleTracker.java |  19 +-
 .../compactions/CompactionRequester.java|  46 
 .../hadoop/hbase/MockRegionServerServices.java  |   6 +
 .../hadoop/hbase/master/MockRegionServer.java   |  36 +--
 .../hbase/regionserver/TestCompaction.java  |   2 +-
 .../TestCompactionLifeCycleTracker.java | 267 +++
 15 files changed, 487 insertions(+), 145 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/c9fdbec7/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 94550df..ba96a5b 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
@@ -158,7 +158,7 @@ public interface RegionObserver {
   /**
* Called prior to selecting the {@link StoreFile StoreFiles} to compact 
from the list of
* available candidates. To alter the files used for compaction, you may 
mutate the passed in list
-   * of candidates.
+   * of candidates. If you remove all the candidates then the compaction will 
be canceled.
* @param c the environment provided by the region server
* @param store the store where compaction is being requested
* @param candidates the store files currently available for compaction
@@ -183,18 +183,12 @@ public interface RegionObserver {
 
   /**
* Called prior to writing the {@link StoreFile}s selected for compaction 
into a new
-   * {@code StoreFile}. To override or modify the compaction process, 
implementing classes have two
-   * options:
-   * 
-   * Wrap the provided {@link InternalScanner} with a custom 
implementation that is returned
-   * from this method. The custom scanner can then inspect
-   *  {@link org.apache.hadoop.hbase.KeyValue}s from the wrapped scanner, 
applying its own
-   *   policy to what gets written.
-   * Call {@link 
org.apache.hadoop.hbase.coprocessor.ObserverContext#bypass()} and provide a
-   * custom implementation for writing of new {@link StoreFile}s. 
Note: any implementations
-   * bypassing core compaction using this approach must write out new store 
files themselves or the
-   * existing data will no longer be available after compaction.
-   * 
+   * {@code StoreFile}.
+   * 
+   * To override or modify the compaction process, implementing classes can 
wrap the provided
+   * {@link InternalScanner} with a custom implementation that is returned 
from this method. The
+   * custom scanner can then inspect {@link org.apache.hadoop.hbase.Cell}s 
from the wrapped scanner,
+   * applying its own policy to what gets written.
* @param c the environment provided by the region server
* @param store the store being compacted
* @param scanner the scanner over existing data used in the store file 
rewriting
@@ -206,8 +200,7 @@ public interface RegionObserver {
*/
   default InternalScanner 
preCompact(ObserverContext c, Store store,
   InternalScanner scanner, ScanType scanType, CompactionLifeCycleTracker 
tracker,
-  CompactionRequest request)
-  throws IOException {
+  CompactionRequest request) throws IOException {
 return scanner;
   }
 

http://git-wip-us.apache.org/repos/asf/hbase/blob/c9fdbec7/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/CompactSplit.java
--
diff --git 

hbase git commit: HBASE-18989 Polish the compaction related CP hooks

2017-10-23 Thread zhangduo
Repository: hbase
Updated Branches:
  refs/heads/branch-2 fad75f07a -> 4c43ef268


HBASE-18989 Polish the compaction related CP hooks


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

Branch: refs/heads/branch-2
Commit: 4c43ef2683e8e410c28fda9f96d912f2edf9fe29
Parents: fad75f0
Author: zhangduo 
Authored: Mon Oct 23 16:44:54 2017 +0800
Committer: zhangduo 
Committed: Mon Oct 23 16:52:02 2017 +0800

--
 .../hbase/coprocessor/RegionObserver.java   |  23 +-
 .../hadoop/hbase/regionserver/CompactSplit.java | 101 +--
 .../hadoop/hbase/regionserver/HRegion.java  |  34 ++-
 .../hbase/regionserver/HRegionServer.java   |  10 +-
 .../hadoop/hbase/regionserver/HStore.java   |   5 +-
 .../hbase/regionserver/RSRpcServices.java   |  47 +---
 .../hadoop/hbase/regionserver/Region.java   |  19 +-
 .../regionserver/RegionServerServices.java  |  10 +-
 .../apache/hadoop/hbase/regionserver/Store.java |   7 -
 .../compactions/CompactionLifeCycleTracker.java |  19 +-
 .../compactions/CompactionRequester.java|  46 
 .../hadoop/hbase/MockRegionServerServices.java  |   6 +
 .../hadoop/hbase/master/MockRegionServer.java   |  36 +--
 .../hbase/regionserver/TestCompaction.java  |   2 +-
 .../TestCompactionLifeCycleTracker.java | 267 +++
 15 files changed, 487 insertions(+), 145 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/4c43ef26/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 94550df..ba96a5b 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
@@ -158,7 +158,7 @@ public interface RegionObserver {
   /**
* Called prior to selecting the {@link StoreFile StoreFiles} to compact 
from the list of
* available candidates. To alter the files used for compaction, you may 
mutate the passed in list
-   * of candidates.
+   * of candidates. If you remove all the candidates then the compaction will 
be canceled.
* @param c the environment provided by the region server
* @param store the store where compaction is being requested
* @param candidates the store files currently available for compaction
@@ -183,18 +183,12 @@ public interface RegionObserver {
 
   /**
* Called prior to writing the {@link StoreFile}s selected for compaction 
into a new
-   * {@code StoreFile}. To override or modify the compaction process, 
implementing classes have two
-   * options:
-   * 
-   * Wrap the provided {@link InternalScanner} with a custom 
implementation that is returned
-   * from this method. The custom scanner can then inspect
-   *  {@link org.apache.hadoop.hbase.KeyValue}s from the wrapped scanner, 
applying its own
-   *   policy to what gets written.
-   * Call {@link 
org.apache.hadoop.hbase.coprocessor.ObserverContext#bypass()} and provide a
-   * custom implementation for writing of new {@link StoreFile}s. 
Note: any implementations
-   * bypassing core compaction using this approach must write out new store 
files themselves or the
-   * existing data will no longer be available after compaction.
-   * 
+   * {@code StoreFile}.
+   * 
+   * To override or modify the compaction process, implementing classes can 
wrap the provided
+   * {@link InternalScanner} with a custom implementation that is returned 
from this method. The
+   * custom scanner can then inspect {@link org.apache.hadoop.hbase.Cell}s 
from the wrapped scanner,
+   * applying its own policy to what gets written.
* @param c the environment provided by the region server
* @param store the store being compacted
* @param scanner the scanner over existing data used in the store file 
rewriting
@@ -206,8 +200,7 @@ public interface RegionObserver {
*/
   default InternalScanner 
preCompact(ObserverContext c, Store store,
   InternalScanner scanner, ScanType scanType, CompactionLifeCycleTracker 
tracker,
-  CompactionRequest request)
-  throws IOException {
+  CompactionRequest request) throws IOException {
 return scanner;
   }
 

http://git-wip-us.apache.org/repos/asf/hbase/blob/4c43ef26/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/CompactSplit.java

hbase git commit: HBASE-18989 Polish the compaction related CP hooks

2017-10-23 Thread zhangduo
Repository: hbase
Updated Branches:
  refs/heads/master 4add40ca2 -> c9fdbec77


HBASE-18989 Polish the compaction related CP hooks


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

Branch: refs/heads/master
Commit: c9fdbec772fe7dea06644d86e2854b98047ac9da
Parents: 4add40c
Author: zhangduo 
Authored: Mon Oct 23 16:44:54 2017 +0800
Committer: zhangduo 
Committed: Mon Oct 23 16:44:54 2017 +0800

--
 .../hbase/coprocessor/RegionObserver.java   |  23 +-
 .../hadoop/hbase/regionserver/CompactSplit.java | 101 +--
 .../hadoop/hbase/regionserver/HRegion.java  |  34 ++-
 .../hbase/regionserver/HRegionServer.java   |  10 +-
 .../hadoop/hbase/regionserver/HStore.java   |   5 +-
 .../hbase/regionserver/RSRpcServices.java   |  47 +---
 .../hadoop/hbase/regionserver/Region.java   |  19 +-
 .../regionserver/RegionServerServices.java  |  10 +-
 .../apache/hadoop/hbase/regionserver/Store.java |   7 -
 .../compactions/CompactionLifeCycleTracker.java |  19 +-
 .../compactions/CompactionRequester.java|  46 
 .../hadoop/hbase/MockRegionServerServices.java  |   6 +
 .../hadoop/hbase/master/MockRegionServer.java   |  36 +--
 .../hbase/regionserver/TestCompaction.java  |   2 +-
 .../TestCompactionLifeCycleTracker.java | 267 +++
 15 files changed, 487 insertions(+), 145 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/c9fdbec7/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 94550df..ba96a5b 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
@@ -158,7 +158,7 @@ public interface RegionObserver {
   /**
* Called prior to selecting the {@link StoreFile StoreFiles} to compact 
from the list of
* available candidates. To alter the files used for compaction, you may 
mutate the passed in list
-   * of candidates.
+   * of candidates. If you remove all the candidates then the compaction will 
be canceled.
* @param c the environment provided by the region server
* @param store the store where compaction is being requested
* @param candidates the store files currently available for compaction
@@ -183,18 +183,12 @@ public interface RegionObserver {
 
   /**
* Called prior to writing the {@link StoreFile}s selected for compaction 
into a new
-   * {@code StoreFile}. To override or modify the compaction process, 
implementing classes have two
-   * options:
-   * 
-   * Wrap the provided {@link InternalScanner} with a custom 
implementation that is returned
-   * from this method. The custom scanner can then inspect
-   *  {@link org.apache.hadoop.hbase.KeyValue}s from the wrapped scanner, 
applying its own
-   *   policy to what gets written.
-   * Call {@link 
org.apache.hadoop.hbase.coprocessor.ObserverContext#bypass()} and provide a
-   * custom implementation for writing of new {@link StoreFile}s. 
Note: any implementations
-   * bypassing core compaction using this approach must write out new store 
files themselves or the
-   * existing data will no longer be available after compaction.
-   * 
+   * {@code StoreFile}.
+   * 
+   * To override or modify the compaction process, implementing classes can 
wrap the provided
+   * {@link InternalScanner} with a custom implementation that is returned 
from this method. The
+   * custom scanner can then inspect {@link org.apache.hadoop.hbase.Cell}s 
from the wrapped scanner,
+   * applying its own policy to what gets written.
* @param c the environment provided by the region server
* @param store the store being compacted
* @param scanner the scanner over existing data used in the store file 
rewriting
@@ -206,8 +200,7 @@ public interface RegionObserver {
*/
   default InternalScanner 
preCompact(ObserverContext c, Store store,
   InternalScanner scanner, ScanType scanType, CompactionLifeCycleTracker 
tracker,
-  CompactionRequest request)
-  throws IOException {
+  CompactionRequest request) throws IOException {
 return scanner;
   }
 

http://git-wip-us.apache.org/repos/asf/hbase/blob/c9fdbec7/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/CompactSplit.java