hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From apurt...@apache.org
Subject [16/16] hbase git commit: HBASE-12972 Region, a supportable public/evolving subset of HRegion
Date Tue, 31 Mar 2015 01:40:35 GMT
HBASE-12972 Region, a supportable public/evolving subset of HRegion


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

Branch: refs/heads/branch-1
Commit: af1715933edc2fe9b912e6fdb8abc2d39e4d2609
Parents: 26f4c32
Author: Andrew Purtell <apurtell@apache.org>
Authored: Mon Mar 30 09:37:24 2015 -0700
Committer: Andrew Purtell <apurtell@apache.org>
Committed: Mon Mar 30 18:01:32 2015 -0700

----------------------------------------------------------------------
 .../java/org/apache/hadoop/hbase/Stoppable.java |   4 +-
 .../coprocessor/example/BulkDeleteEndpoint.java |   7 +-
 .../tmpl/regionserver/RegionListTmpl.jamon      |   4 +-
 .../java/org/apache/hadoop/hbase/Server.java    |   4 +-
 .../SplitTransactionCoordination.java           |   7 +-
 .../ZKSplitTransactionCoordination.java         |  13 +-
 .../ZkSplitLogWorkerCoordination.java           |   4 +-
 .../coprocessor/AggregateImplementation.java    |   8 +-
 .../hbase/coprocessor/BaseRegionObserver.java   |   6 +-
 .../coprocessor/BaseRegionServerObserver.java   |  18 +-
 .../coprocessor/BaseRowProcessorEndpoint.java   |   8 +-
 .../RegionCoprocessorEnvironment.java           |   4 +-
 .../hbase/coprocessor/RegionObserver.java       |  14 +-
 .../hbase/coprocessor/RegionServerObserver.java |  14 +-
 .../hadoop/hbase/master/RegionStateStore.java   |   4 +-
 .../hbase/migration/NamespaceUpgrade.java       |   2 +-
 .../procedure/flush/FlushTableSubprocedure.java |  15 +-
 .../RegionServerFlushTableProcedureManager.java |   6 +-
 .../AnnotationReadingPriorityFunction.java      |   5 +-
 .../hbase/regionserver/CompactSplitThread.java  |  48 +-
 .../hbase/regionserver/CompactionRequestor.java |  14 +-
 .../ConstantSizeRegionSplitPolicy.java          |   2 +-
 .../regionserver/FavoredNodesForRegion.java     |   7 +-
 .../regionserver/FlushRequestListener.java      |   2 +-
 .../hbase/regionserver/FlushRequester.java      |   8 +-
 .../hadoop/hbase/regionserver/HRegion.java      | 893 ++++++-------------
 .../hbase/regionserver/HRegionServer.java       | 194 ++--
 .../hbase/regionserver/HeapMemoryManager.java   |   2 +-
 ...IncreasingToUpperBoundRegionSplitPolicy.java |   4 +-
 .../hadoop/hbase/regionserver/LogRoller.java    |   2 +-
 .../hbase/regionserver/MemStoreFlusher.java     |  95 +-
 .../MetricsRegionServerWrapperImpl.java         |  22 +-
 .../hbase/regionserver/OnlineRegions.java       |  27 +-
 .../hbase/regionserver/RSRpcServices.java       | 145 +--
 .../hadoop/hbase/regionserver/Region.java       | 680 ++++++++++++++
 .../regionserver/RegionCoprocessorHost.java     |  16 +-
 .../hbase/regionserver/RegionMergeRequest.java  |  11 +-
 .../regionserver/RegionMergeTransaction.java    |  35 +-
 .../regionserver/RegionServerServices.java      |  13 +-
 .../hbase/regionserver/RegionSplitPolicy.java   |   6 +-
 .../hadoop/hbase/regionserver/SplitRequest.java |  18 +-
 .../hbase/regionserver/SplitTransaction.java    |  38 +-
 .../apache/hadoop/hbase/regionserver/Store.java |   7 +-
 .../regionserver/StorefileRefresherChore.java   |  10 +-
 .../handler/CloseRegionHandler.java             |   4 +-
 .../handler/FinishRegionRecoveringHandler.java  |   5 +-
 .../snapshot/FlushSnapshotSubprocedure.java     |  16 +-
 .../snapshot/RegionServerSnapshotManager.java   |  12 +-
 .../security/access/AccessControlLists.java     |   7 +-
 .../hbase/security/access/AccessController.java |  34 +-
 .../security/access/SecureBulkLoadEndpoint.java |   8 +-
 .../DefaultVisibilityLabelServiceImpl.java      |   9 +-
 .../visibility/VisibilityController.java        |   8 +-
 .../security/visibility/VisibilityUtils.java    |   4 +-
 .../hadoop/hbase/snapshot/SnapshotManifest.java |   2 +-
 .../hadoop/hbase/tool/WriteSinkCoprocessor.java |   2 +-
 .../org/apache/hadoop/hbase/util/HMerge.java    |  15 +-
 .../org/apache/hadoop/hbase/util/Merge.java     |   4 +-
 .../org/apache/hadoop/hbase/HBaseTestCase.java  |  12 +-
 .../hadoop/hbase/HBaseTestingUtility.java       |  46 +-
 .../apache/hadoop/hbase/MiniHBaseCluster.java   |  30 +-
 .../hadoop/hbase/MockRegionServerServices.java  |  17 +-
 .../hadoop/hbase/TestGlobalMemStoreSize.java    |  16 +-
 .../org/apache/hadoop/hbase/TestIOFencing.java  |   8 +-
 .../hadoop/hbase/backup/TestHFileArchiving.java |  31 +-
 .../TestZooKeeperTableArchiveClient.java        |  16 +-
 .../apache/hadoop/hbase/client/TestAdmin2.java  |  10 +-
 .../hadoop/hbase/client/TestClientPushback.java |  10 +-
 .../hadoop/hbase/client/TestFastFail.java       |   4 +-
 .../hadoop/hbase/client/TestFromClientSide.java |  16 +-
 .../org/apache/hadoop/hbase/client/TestHCM.java |   6 +-
 .../ColumnAggregationEndpointNullResponse.java  |   8 +-
 .../ColumnAggregationEndpointWithErrors.java    |   6 +-
 .../hbase/coprocessor/SimpleRegionObserver.java |  10 +-
 .../hbase/coprocessor/TestClassLoading.java     |  33 +-
 .../coprocessor/TestCoprocessorInterface.java   |  52 +-
 .../TestRegionObserverScannerOpenHook.java      |  17 +-
 .../coprocessor/TestRegionServerObserver.java   |  21 +-
 .../apache/hadoop/hbase/filter/TestFilter.java  |  25 +-
 .../filter/TestInvocationRecordFilter.java      |   9 +-
 .../hadoop/hbase/fs/TestBlockReorder.java       |  11 +-
 .../hbase/io/encoding/TestEncodedSeekers.java   |  13 +-
 .../hbase/io/encoding/TestPrefixTree.java       |   4 +-
 .../hadoop/hbase/io/hfile/TestCacheOnWrite.java |   9 +-
 .../io/hfile/TestForceCacheImportantBlocks.java |   8 +-
 .../TestScannerSelectionUsingKeyRange.java      |   2 +-
 .../io/hfile/TestScannerSelectionUsingTTL.java  |   4 +-
 .../TestImportTSVWithOperationAttributes.java   |   6 +-
 .../hbase/mapreduce/TestImportTSVWithTTLs.java  |   5 +-
 .../hadoop/hbase/master/MockRegionServer.java   |  12 +-
 .../hbase/master/TestAssignmentListener.java    |   7 +-
 .../master/TestDistributedLogSplitting.java     |   5 +-
 .../master/TestGetLastFlushedSequenceId.java    |   6 +-
 .../hadoop/hbase/master/TestMasterFailover.java |   7 +-
 .../hbase/master/TestOpenedRegionHandler.java   |  11 +-
 .../hbase/master/TestRegionPlacement.java       |  13 +-
 .../hbase/master/TestTableLockManager.java      |   2 +-
 .../regionserver/NoOpScanPolicyObserver.java    |   2 +-
 .../hbase/regionserver/TestAtomicOperation.java |  46 +-
 .../hbase/regionserver/TestBlocksRead.java      |  20 +-
 .../hbase/regionserver/TestBlocksScanned.java   |   5 +-
 .../hadoop/hbase/regionserver/TestBulkLoad.java |  20 +-
 .../hbase/regionserver/TestColumnSeeking.java   |  12 +-
 .../hbase/regionserver/TestCompaction.java      |   6 +-
 .../hbase/regionserver/TestCompactionState.java |  10 +-
 .../hbase/regionserver/TestDefaultMemStore.java |   5 +-
 .../regionserver/TestEncryptionKeyRotation.java |   5 +-
 .../TestEncryptionRandomKeying.java             |   5 +-
 .../TestEndToEndSplitTransaction.java           |   8 +-
 .../regionserver/TestGetClosestAtOrBefore.java  |  29 +-
 .../hadoop/hbase/regionserver/TestHRegion.java  | 173 ++--
 .../regionserver/TestHRegionReplayEvents.java   |  94 +-
 .../regionserver/TestHeapMemoryManager.java     |   4 +-
 .../hbase/regionserver/TestKeepDeletes.java     |  88 +-
 .../hbase/regionserver/TestMajorCompaction.java |  65 +-
 .../hbase/regionserver/TestMinVersions.java     |  24 +-
 .../hbase/regionserver/TestMinorCompaction.java |  12 +-
 .../regionserver/TestMultiColumnScanner.java    |   2 +-
 .../regionserver/TestPerColumnFamilyFlush.java  |  80 +-
 .../regionserver/TestRegionFavoredNodes.java    |  10 +-
 .../TestRegionMergeTransaction.java             |  22 +-
 .../regionserver/TestRegionReplicaFailover.java |   6 +-
 .../hbase/regionserver/TestRegionReplicas.java  |  30 +-
 .../regionserver/TestRegionServerNoMaster.java  |   4 +-
 .../TestRegionServerOnlineConfigChange.java     |   2 +-
 .../regionserver/TestRegionSplitPolicy.java     |  20 +-
 .../regionserver/TestResettingCounters.java     |   8 +-
 .../regionserver/TestReversibleScanners.java    |   4 +-
 .../hbase/regionserver/TestRowTooBig.java       |  10 +-
 .../regionserver/TestScanWithBloomError.java    |   2 +-
 .../hadoop/hbase/regionserver/TestScanner.java  |  12 +-
 .../regionserver/TestSeekOptimizations.java     |   2 +-
 .../regionserver/TestSplitTransaction.java      |  24 +-
 .../TestSplitTransactionOnCluster.java          |  49 +-
 .../TestStoreFileRefresherChore.java            |  23 +-
 .../TestCompactionWithThroughputController.java |   7 +-
 .../hbase/regionserver/wal/TestFSHLog.java      |   2 +-
 .../hbase/regionserver/wal/TestLogRolling.java  |  18 +-
 .../hbase/regionserver/wal/TestWALReplay.java   |  45 +-
 .../replication/TestMultiSlaveReplication.java  |   2 +-
 .../TestRegionReplicaReplicationEndpoint.java   |  15 +-
 ...egionReplicaReplicationEndpointNoMaster.java |   7 +-
 .../hbase/security/access/SecureTestUtil.java   |  10 +-
 .../security/access/TestAccessController.java   |   5 +-
 .../ExpAsStringVisibilityLabelServiceImpl.java  |   4 +-
 .../visibility/TestVisibilityLabels.java        |   8 +-
 .../hbase/snapshot/SnapshotTestingUtils.java    |   6 +-
 .../apache/hadoop/hbase/util/TestHBaseFsck.java |   4 +-
 .../hbase/util/TestHBaseFsckEncryption.java     |   7 +-
 .../hadoop/hbase/util/TestMergeTable.java       |   4 +-
 .../hadoop/hbase/wal/TestWALFiltering.java      |   6 +-
 151 files changed, 2308 insertions(+), 1889 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/af171593/hbase-common/src/main/java/org/apache/hadoop/hbase/Stoppable.java
----------------------------------------------------------------------
diff --git a/hbase-common/src/main/java/org/apache/hadoop/hbase/Stoppable.java b/hbase-common/src/main/java/org/apache/hadoop/hbase/Stoppable.java
index b87b764..fc83ba3 100644
--- a/hbase-common/src/main/java/org/apache/hadoop/hbase/Stoppable.java
+++ b/hbase-common/src/main/java/org/apache/hadoop/hbase/Stoppable.java
@@ -19,11 +19,13 @@
 package org.apache.hadoop.hbase;
 
 import org.apache.hadoop.hbase.classification.InterfaceAudience;
+import org.apache.hadoop.hbase.classification.InterfaceStability;
 
 /**
  * Implementers are Stoppable.
  */
-@InterfaceAudience.Private
+@InterfaceAudience.LimitedPrivate(HBaseInterfaceAudience.COPROC)
+@InterfaceStability.Evolving
 public interface Stoppable {
   /**
    * Stop this service.

http://git-wip-us.apache.org/repos/asf/hbase/blob/af171593/hbase-examples/src/main/java/org/apache/hadoop/hbase/coprocessor/example/BulkDeleteEndpoint.java
----------------------------------------------------------------------
diff --git a/hbase-examples/src/main/java/org/apache/hadoop/hbase/coprocessor/example/BulkDeleteEndpoint.java b/hbase-examples/src/main/java/org/apache/hadoop/hbase/coprocessor/example/BulkDeleteEndpoint.java
index 90ef637..e0c3bae 100644
--- a/hbase-examples/src/main/java/org/apache/hadoop/hbase/coprocessor/example/BulkDeleteEndpoint.java
+++ b/hbase-examples/src/main/java/org/apache/hadoop/hbase/coprocessor/example/BulkDeleteEndpoint.java
@@ -46,9 +46,9 @@ import org.apache.hadoop.hbase.coprocessor.example.generated.BulkDeleteProtos.Bu
 import org.apache.hadoop.hbase.filter.FirstKeyOnlyFilter;
 import org.apache.hadoop.hbase.protobuf.ProtobufUtil;
 import org.apache.hadoop.hbase.protobuf.ResponseConverter;
-import org.apache.hadoop.hbase.regionserver.HRegion;
 import org.apache.hadoop.hbase.regionserver.InternalScanner.NextState;
 import org.apache.hadoop.hbase.regionserver.OperationStatus;
+import org.apache.hadoop.hbase.regionserver.Region;
 import org.apache.hadoop.hbase.regionserver.RegionScanner;
 import org.apache.hadoop.hbase.util.Bytes;
 
@@ -113,7 +113,7 @@ public class BulkDeleteEndpoint extends BulkDeleteService implements Coprocessor
       RpcCallback<BulkDeleteResponse> done) {
     long totalRowsDeleted = 0L;
     long totalVersionsDeleted = 0L;
-    HRegion region = env.getRegion();
+    Region region = env.getRegion();
     int rowBatchSize = request.getRowBatchSize();
     Long timestamp = null;
     if (request.hasTimestamp()) {
@@ -152,7 +152,8 @@ public class BulkDeleteEndpoint extends BulkDeleteService implements Coprocessor
           for (List<Cell> deleteRow : deleteRows) {
             deleteArr[i++] = createDeleteMutation(deleteRow, deleteType, timestamp);
           }
-          OperationStatus[] opStatus = region.batchMutate(deleteArr);
+          OperationStatus[] opStatus = region.batchMutate(deleteArr, HConstants.NO_NONCE,
+            HConstants.NO_NONCE);
           for (i = 0; i < opStatus.length; i++) {
             if (opStatus[i].getOperationStatusCode() != OperationStatusCode.SUCCESS) {
               break;

http://git-wip-us.apache.org/repos/asf/hbase/blob/af171593/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/regionserver/RegionListTmpl.jamon
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/regionserver/RegionListTmpl.jamon b/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/regionserver/RegionListTmpl.jamon
index 40fe757..ebc1625 100644
--- a/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/regionserver/RegionListTmpl.jamon
+++ b/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/regionserver/RegionListTmpl.jamon
@@ -26,7 +26,7 @@
         org.apache.hadoop.hbase.regionserver.HRegionServer;
         org.apache.hadoop.hbase.util.Bytes;
         org.apache.hadoop.hbase.HRegionInfo;
-        org.apache.hadoop.hbase.regionserver.HRegion;
+        org.apache.hadoop.hbase.regionserver.Region;
         org.apache.hadoop.hbase.ServerName;
         org.apache.hadoop.hbase.HBaseConfiguration;
         org.apache.hadoop.hbase.protobuf.ProtobufUtil;
@@ -247,7 +247,7 @@
 
         <%for HRegionInfo r: onlineRegions %>
         <%java>    
-            HRegion region = regionServer.getFromOnlineRegions(r.getEncodedName());
+            Region region = regionServer.getFromOnlineRegions(r.getEncodedName());
             MetricsRegionWrapper mWrap = region == null ? null: region.getMetrics().getRegionWrapper();
         </%java>
         

http://git-wip-us.apache.org/repos/asf/hbase/blob/af171593/hbase-server/src/main/java/org/apache/hadoop/hbase/Server.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/Server.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/Server.java
index 85f8471..365c0b8 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/Server.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/Server.java
@@ -20,6 +20,7 @@ package org.apache.hadoop.hbase;
 
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.hbase.classification.InterfaceAudience;
+import org.apache.hadoop.hbase.classification.InterfaceStability;
 import org.apache.hadoop.hbase.client.ClusterConnection;
 import org.apache.hadoop.hbase.zookeeper.MetaTableLocator;
 import org.apache.hadoop.hbase.zookeeper.ZooKeeperWatcher;
@@ -28,7 +29,8 @@ import org.apache.hadoop.hbase.zookeeper.ZooKeeperWatcher;
  * Defines the set of shared functions implemented by HBase servers (Masters
  * and RegionServers).
  */
-@InterfaceAudience.Private
+@InterfaceAudience.LimitedPrivate(HBaseInterfaceAudience.COPROC)
+@InterfaceStability.Evolving
 public interface Server extends Abortable, Stoppable {
   /**
    * Gets the configuration object for this server.

http://git-wip-us.apache.org/repos/asf/hbase/blob/af171593/hbase-server/src/main/java/org/apache/hadoop/hbase/coordination/SplitTransactionCoordination.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/coordination/SplitTransactionCoordination.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/coordination/SplitTransactionCoordination.java
index bbc8500..3466d04 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/coordination/SplitTransactionCoordination.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/coordination/SplitTransactionCoordination.java
@@ -25,6 +25,7 @@ import org.apache.hadoop.hbase.classification.InterfaceAudience;
 import org.apache.hadoop.hbase.HRegionInfo;
 import org.apache.hadoop.hbase.ServerName;
 import org.apache.hadoop.hbase.regionserver.HRegion;
+import org.apache.hadoop.hbase.regionserver.Region;
 import org.apache.hadoop.hbase.regionserver.RegionServerServices;
 
 /**
@@ -69,7 +70,7 @@ public interface SplitTransactionCoordination {
    * @throws IOException
    */
   void waitForSplitTransaction(final RegionServerServices services,
-      HRegion parent, HRegionInfo hri_a, HRegionInfo hri_b, SplitTransactionDetails std)
+      Region parent, HRegionInfo hri_a, HRegionInfo hri_b, SplitTransactionDetails std)
       throws IOException;
 
   /**
@@ -83,8 +84,8 @@ public interface SplitTransactionCoordination {
    *  {@link org.apache.hadoop.hbase.regionserver.
    *  SplitTransaction#rollback(Server, RegionServerServices)}
    */
-  void completeSplitTransaction(RegionServerServices services, HRegion first,
-      HRegion second, SplitTransactionDetails std, HRegion parent) throws IOException;
+  void completeSplitTransaction(RegionServerServices services, Region first,
+      Region second, SplitTransactionDetails std, Region parent) throws IOException;
 
   /**
    * clean the split transaction

http://git-wip-us.apache.org/repos/asf/hbase/blob/af171593/hbase-server/src/main/java/org/apache/hadoop/hbase/coordination/ZKSplitTransactionCoordination.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/coordination/ZKSplitTransactionCoordination.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/coordination/ZKSplitTransactionCoordination.java
index e28f079..5b831ee 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/coordination/ZKSplitTransactionCoordination.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/coordination/ZKSplitTransactionCoordination.java
@@ -27,6 +27,7 @@ import org.apache.hadoop.hbase.ServerName;
 import org.apache.hadoop.hbase.coordination.SplitTransactionCoordination;
 import org.apache.hadoop.hbase.executor.EventType;
 import org.apache.hadoop.hbase.regionserver.HRegion;
+import org.apache.hadoop.hbase.regionserver.Region;
 import org.apache.hadoop.hbase.regionserver.RegionServerServices;
 import org.apache.hadoop.hbase.zookeeper.ZKAssign;
 import org.apache.hadoop.hbase.zookeeper.ZKUtil;
@@ -80,7 +81,7 @@ public class ZKSplitTransactionCoordination implements SplitTransactionCoordinat
 
     } catch (KeeperException e) {
       throw new IOException("Failed creating PENDING_SPLIT znode on "
-          + parent.getRegionNameAsString(), e);
+          + parent.getRegionInfo().getRegionNameAsString(), e);
     }
 
   }
@@ -139,7 +140,7 @@ public class ZKSplitTransactionCoordination implements SplitTransactionCoordinat
    * the node is removed or is not in pending_split state any more, we abort the split.
    */
   @Override
-  public void waitForSplitTransaction(final RegionServerServices services, HRegion parent,
+  public void waitForSplitTransaction(final RegionServerServices services, Region parent,
       HRegionInfo hri_a, HRegionInfo hri_b, SplitTransactionDetails sptd) throws IOException {
     ZkSplitTransactionDetails zstd = (ZkSplitTransactionDetails) sptd;
 
@@ -196,8 +197,8 @@ public class ZKSplitTransactionCoordination implements SplitTransactionCoordinat
       if (e instanceof InterruptedException) {
         Thread.currentThread().interrupt();
       }
-      throw new IOException("Failed getting SPLITTING znode on " + parent.getRegionNameAsString(),
-          e);
+      throw new IOException("Failed getting SPLITTING znode on " +
+        parent.getRegionInfo().getRegionNameAsString(), e);
     }
   }
 
@@ -213,8 +214,8 @@ public class ZKSplitTransactionCoordination implements SplitTransactionCoordinat
    *  Server, RegionServerServices)}
    */
   @Override
-  public void completeSplitTransaction(final RegionServerServices services, HRegion a, HRegion b,
-      SplitTransactionDetails std, HRegion parent) throws IOException {
+  public void completeSplitTransaction(final RegionServerServices services, Region a, Region b,
+      SplitTransactionDetails std, Region parent) throws IOException {
     ZkSplitTransactionDetails zstd = (ZkSplitTransactionDetails) std;
     // Tell master about split by updating zk. If we fail, abort.
     if (coordinationManager.getServer() != null) {

http://git-wip-us.apache.org/repos/asf/hbase/blob/af171593/hbase-server/src/main/java/org/apache/hadoop/hbase/coordination/ZkSplitLogWorkerCoordination.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/coordination/ZkSplitLogWorkerCoordination.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/coordination/ZkSplitLogWorkerCoordination.java
index 3fdfa5c..637920b 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/coordination/ZkSplitLogWorkerCoordination.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/coordination/ZkSplitLogWorkerCoordination.java
@@ -41,7 +41,7 @@ import org.apache.hadoop.hbase.classification.InterfaceAudience;
 import org.apache.hadoop.hbase.exceptions.DeserializationException;
 import org.apache.hadoop.hbase.protobuf.generated.ClusterStatusProtos.RegionStoreSequenceIds;
 import org.apache.hadoop.hbase.protobuf.generated.ZooKeeperProtos.SplitLogTask.RecoveryMode;
-import org.apache.hadoop.hbase.regionserver.HRegion;
+import org.apache.hadoop.hbase.regionserver.Region;
 import org.apache.hadoop.hbase.regionserver.RegionServerServices;
 import org.apache.hadoop.hbase.regionserver.SplitLogWorker;
 import org.apache.hadoop.hbase.regionserver.SplitLogWorker.TaskExecutor;
@@ -445,7 +445,7 @@ public class ZkSplitLogWorkerCoordination extends ZooKeeperListener implements
           taskReadyLock.wait(checkInterval);
           if (server != null) {
             // check to see if we have stale recovering regions in our internal memory state
-            Map<String, HRegion> recoveringRegions = server.getRecoveringRegions();
+            Map<String, Region> recoveringRegions = server.getRecoveringRegions();
             if (!recoveringRegions.isEmpty()) {
               // Make a local copy to prevent ConcurrentModificationException when other threads
               // modify recoveringRegions

http://git-wip-us.apache.org/repos/asf/hbase/blob/af171593/hbase-server/src/main/java/org/apache/hadoop/hbase/coprocessor/AggregateImplementation.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/coprocessor/AggregateImplementation.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/coprocessor/AggregateImplementation.java
index b5d16ba..b6f834e 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/coprocessor/AggregateImplementation.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/coprocessor/AggregateImplementation.java
@@ -115,7 +115,7 @@ extends AggregateService implements CoprocessorService, Coprocessor {
       }
     }
     log.info("Maximum from this region is "
-        + env.getRegion().getRegionNameAsString() + ": " + max);
+        + env.getRegion().getRegionInfo().getRegionNameAsString() + ": " + max);
     done.run(response);
   }
 
@@ -168,7 +168,7 @@ extends AggregateService implements CoprocessorService, Coprocessor {
       }
     }
     log.info("Minimum from this region is "
-        + env.getRegion().getRegionNameAsString() + ": " + min);
+        + env.getRegion().getRegionInfo().getRegionNameAsString() + ": " + min);
     done.run(response);
   }
 
@@ -223,7 +223,7 @@ extends AggregateService implements CoprocessorService, Coprocessor {
       }
     }
     log.debug("Sum from this region is "
-        + env.getRegion().getRegionNameAsString() + ": " + sum);
+        + env.getRegion().getRegionInfo().getRegionNameAsString() + ": " + sum);
     done.run(response);
   }
 
@@ -274,7 +274,7 @@ extends AggregateService implements CoprocessorService, Coprocessor {
       }
     }
     log.info("Row counter from this region is "
-        + env.getRegion().getRegionNameAsString() + ": " + counter);
+        + env.getRegion().getRegionInfo().getRegionNameAsString() + ": " + counter);
     done.run(response);
   }
 

http://git-wip-us.apache.org/repos/asf/hbase/blob/af171593/hbase-server/src/main/java/org/apache/hadoop/hbase/coprocessor/BaseRegionObserver.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/coprocessor/BaseRegionObserver.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/coprocessor/BaseRegionObserver.java
index 215ff16..9e0cb9b 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/coprocessor/BaseRegionObserver.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/coprocessor/BaseRegionObserver.java
@@ -42,11 +42,11 @@ import org.apache.hadoop.hbase.io.FSDataInputStreamWrapper;
 import org.apache.hadoop.hbase.io.Reference;
 import org.apache.hadoop.hbase.io.hfile.CacheConfig;
 import org.apache.hadoop.hbase.regionserver.DeleteTracker;
-import org.apache.hadoop.hbase.regionserver.HRegion;
-import org.apache.hadoop.hbase.regionserver.HRegion.Operation;
 import org.apache.hadoop.hbase.regionserver.InternalScanner;
 import org.apache.hadoop.hbase.regionserver.KeyValueScanner;
 import org.apache.hadoop.hbase.regionserver.MiniBatchOperationInProgress;
+import org.apache.hadoop.hbase.regionserver.Region;
+import org.apache.hadoop.hbase.regionserver.Region.Operation;
 import org.apache.hadoop.hbase.regionserver.RegionScanner;
 import org.apache.hadoop.hbase.regionserver.ScanType;
 import org.apache.hadoop.hbase.regionserver.Store;
@@ -152,7 +152,7 @@ public abstract class BaseRegionObserver implements RegionObserver {
   }
 
   @Override
-  public void postSplit(ObserverContext<RegionCoprocessorEnvironment> e, HRegion l, HRegion r)
+  public void postSplit(ObserverContext<RegionCoprocessorEnvironment> e, Region l, Region r)
       throws IOException {
   }
 

http://git-wip-us.apache.org/repos/asf/hbase/blob/af171593/hbase-server/src/main/java/org/apache/hadoop/hbase/coprocessor/BaseRegionServerObserver.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/coprocessor/BaseRegionServerObserver.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/coprocessor/BaseRegionServerObserver.java
index 1f34f88..9fc130f 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/coprocessor/BaseRegionServerObserver.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/coprocessor/BaseRegionServerObserver.java
@@ -25,7 +25,7 @@ import org.apache.hadoop.hbase.CoprocessorEnvironment;
 import org.apache.hadoop.hbase.HBaseInterfaceAudience;
 import org.apache.hadoop.hbase.client.Mutation;
 import org.apache.hadoop.hbase.protobuf.generated.AdminProtos.WALEntry;
-import org.apache.hadoop.hbase.regionserver.HRegion;
+import org.apache.hadoop.hbase.regionserver.Region;
 import org.apache.hadoop.hbase.replication.ReplicationEndpoint;
 
 /**
@@ -48,28 +48,28 @@ public class BaseRegionServerObserver implements RegionServerObserver {
   public void stop(CoprocessorEnvironment env) throws IOException { }
 
   @Override
-  public void preMerge(ObserverContext<RegionServerCoprocessorEnvironment> ctx, HRegion regionA,
-      HRegion regionB) throws IOException { }
+  public void preMerge(ObserverContext<RegionServerCoprocessorEnvironment> ctx, Region regionA,
+      Region regionB) throws IOException { }
 
   @Override
-  public void postMerge(ObserverContext<RegionServerCoprocessorEnvironment> c, HRegion regionA,
-      HRegion regionB, HRegion mergedRegion) throws IOException { }
+  public void postMerge(ObserverContext<RegionServerCoprocessorEnvironment> c, Region regionA,
+      Region regionB, Region mergedRegion) throws IOException { }
 
   @Override
   public void preMergeCommit(ObserverContext<RegionServerCoprocessorEnvironment> ctx,
-      HRegion regionA, HRegion regionB, List<Mutation> metaEntries) throws IOException { }
+      Region regionA, Region regionB, List<Mutation> metaEntries) throws IOException { }
 
   @Override
   public void postMergeCommit(ObserverContext<RegionServerCoprocessorEnvironment> ctx,
-      HRegion regionA, HRegion regionB, HRegion mergedRegion) throws IOException { }
+      Region regionA, Region regionB, Region mergedRegion) throws IOException { }
 
   @Override
   public void preRollBackMerge(ObserverContext<RegionServerCoprocessorEnvironment> ctx,
-      HRegion regionA, HRegion regionB) throws IOException { }
+      Region regionA, Region regionB) throws IOException { }
 
   @Override
   public void postRollBackMerge(ObserverContext<RegionServerCoprocessorEnvironment> ctx,
-      HRegion regionA, HRegion regionB) throws IOException { }
+      Region regionA, Region regionB) throws IOException { }
 
   @Override
   public void preRollWALWriterRequest(ObserverContext<RegionServerCoprocessorEnvironment> ctx)

http://git-wip-us.apache.org/repos/asf/hbase/blob/af171593/hbase-server/src/main/java/org/apache/hadoop/hbase/coprocessor/BaseRowProcessorEndpoint.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/coprocessor/BaseRowProcessorEndpoint.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/coprocessor/BaseRowProcessorEndpoint.java
index 7b841aa..ab5fc78 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/coprocessor/BaseRowProcessorEndpoint.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/coprocessor/BaseRowProcessorEndpoint.java
@@ -31,7 +31,7 @@ import org.apache.hadoop.hbase.protobuf.ResponseConverter;
 import org.apache.hadoop.hbase.protobuf.generated.RowProcessorProtos.ProcessRequest;
 import org.apache.hadoop.hbase.protobuf.generated.RowProcessorProtos.ProcessResponse;
 import org.apache.hadoop.hbase.protobuf.generated.RowProcessorProtos.RowProcessorService;
-import org.apache.hadoop.hbase.regionserver.HRegion;
+import org.apache.hadoop.hbase.regionserver.Region;
 import org.apache.hadoop.hbase.regionserver.RowProcessor;
 
 import com.google.protobuf.ByteString;
@@ -42,7 +42,7 @@ import com.google.protobuf.Service;
 
 /**
  * This class demonstrates how to implement atomic read-modify-writes
- * using {@link HRegion#processRowsWithLocks} and Coprocessor endpoints.
+ * using {@link Region#processRowsWithLocks} and Coprocessor endpoints.
  */
 @InterfaceAudience.LimitedPrivate(HBaseInterfaceAudience.COPROC)
 @InterfaceStability.Evolving
@@ -50,7 +50,7 @@ public abstract class BaseRowProcessorEndpoint<S extends Message, T extends Mess
 extends RowProcessorService implements CoprocessorService, Coprocessor {
   private RegionCoprocessorEnvironment env;
   /**
-   * Pass a processor to HRegion to process multiple rows atomically.
+   * Pass a processor to region to process multiple rows atomically.
    * 
    * The RowProcessor implementations should be the inner classes of your
    * RowProcessorEndpoint. This way the RowProcessor can be class-loaded with
@@ -68,7 +68,7 @@ extends RowProcessorService implements CoprocessorService, Coprocessor {
     ProcessResponse resultProto = null;
     try {
       RowProcessor<S,T> processor = constructRowProcessorFromRequest(request);
-      HRegion region = env.getRegion();
+      Region region = env.getRegion();
       long nonceGroup = request.hasNonceGroup() ? request.getNonceGroup() : HConstants.NO_NONCE;
       long nonce = request.hasNonce() ? request.getNonce() : HConstants.NO_NONCE;
       region.processRowsWithLocks(processor, nonceGroup, nonce);

http://git-wip-us.apache.org/repos/asf/hbase/blob/af171593/hbase-server/src/main/java/org/apache/hadoop/hbase/coprocessor/RegionCoprocessorEnvironment.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/coprocessor/RegionCoprocessorEnvironment.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/coprocessor/RegionCoprocessorEnvironment.java
index ccb16bf..a577748 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/coprocessor/RegionCoprocessorEnvironment.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/coprocessor/RegionCoprocessorEnvironment.java
@@ -26,14 +26,14 @@ import org.apache.hadoop.hbase.classification.InterfaceStability;
 import org.apache.hadoop.hbase.CoprocessorEnvironment;
 import org.apache.hadoop.hbase.HBaseInterfaceAudience;
 import org.apache.hadoop.hbase.HRegionInfo;
-import org.apache.hadoop.hbase.regionserver.HRegion;
+import org.apache.hadoop.hbase.regionserver.Region;
 import org.apache.hadoop.hbase.regionserver.RegionServerServices;
 
 @InterfaceAudience.LimitedPrivate(HBaseInterfaceAudience.COPROC)
 @InterfaceStability.Evolving
 public interface RegionCoprocessorEnvironment extends CoprocessorEnvironment {
   /** @return the region associated with this coprocessor */
-  HRegion getRegion();
+  Region getRegion();
 
   /** @return region information for the region this coprocessor is running on */
   HRegionInfo getRegionInfo();

http://git-wip-us.apache.org/repos/asf/hbase/blob/af171593/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 a8b20ea..c259d37 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
@@ -42,8 +42,8 @@ import org.apache.hadoop.hbase.io.FSDataInputStreamWrapper;
 import org.apache.hadoop.hbase.io.Reference;
 import org.apache.hadoop.hbase.io.hfile.CacheConfig;
 import org.apache.hadoop.hbase.regionserver.DeleteTracker;
-import org.apache.hadoop.hbase.regionserver.HRegion;
-import org.apache.hadoop.hbase.regionserver.HRegion.Operation;
+import org.apache.hadoop.hbase.regionserver.Region;
+import org.apache.hadoop.hbase.regionserver.Region.Operation;
 import org.apache.hadoop.hbase.regionserver.InternalScanner;
 import org.apache.hadoop.hbase.regionserver.KeyValueScanner;
 import org.apache.hadoop.hbase.regionserver.MiniBatchOperationInProgress;
@@ -364,8 +364,8 @@ public interface RegionObserver extends Coprocessor {
    * @throws IOException if an error occurred on the coprocessor
    * @deprecated Use postCompleteSplit() instead
    */
-  void postSplit(final ObserverContext<RegionCoprocessorEnvironment> c, final HRegion l,
-      final HRegion r) throws IOException;
+  void postSplit(final ObserverContext<RegionCoprocessorEnvironment> c, final Region l,
+      final Region r) throws IOException;
 
   /**
    * This will be called before PONR step as part of split transaction. Calling
@@ -613,7 +613,7 @@ public interface RegionObserver extends Coprocessor {
    * called after acquiring the locks on the mutating rows and after applying the proper timestamp
    * for each Mutation at the server. The batch may contain Put/Delete. By setting OperationStatus
    * of Mutations ({@link MiniBatchOperationInProgress#setOperationStatus(int, OperationStatus)}),
-   * {@link RegionObserver} can make HRegion to skip these Mutations.
+   * {@link RegionObserver} can make Region to skip these Mutations.
    * @param c the environment provided by the region server
    * @param miniBatchOp batch of Mutations getting applied to region.
    * @throws IOException if an error occurred on the coprocessor
@@ -633,7 +633,7 @@ public interface RegionObserver extends Coprocessor {
 
   /**
    * This will be called for region operations where read lock is acquired in
-   * {@link HRegion#startRegionOperation()}.
+   * {@link Region#startRegionOperation()}.
    * @param ctx
    * @param operation The operation is about to be taken on the region
    * @throws IOException
@@ -642,7 +642,7 @@ public interface RegionObserver extends Coprocessor {
       Operation operation) throws IOException;
 
   /**
-   * Called after releasing read lock in {@link HRegion#closeRegionOperation(Operation)}.
+   * Called after releasing read lock in {@link Region#closeRegionOperation()}.
    * @param ctx
    * @param operation
    * @throws IOException

http://git-wip-us.apache.org/repos/asf/hbase/blob/af171593/hbase-server/src/main/java/org/apache/hadoop/hbase/coprocessor/RegionServerObserver.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/coprocessor/RegionServerObserver.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/coprocessor/RegionServerObserver.java
index 316bad5..b1b94ff 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/coprocessor/RegionServerObserver.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/coprocessor/RegionServerObserver.java
@@ -26,7 +26,7 @@ import org.apache.hadoop.hbase.Coprocessor;
 import org.apache.hadoop.hbase.MetaMutationAnnotation;
 import org.apache.hadoop.hbase.client.Mutation;
 import org.apache.hadoop.hbase.protobuf.generated.AdminProtos.WALEntry;
-import org.apache.hadoop.hbase.regionserver.HRegion;
+import org.apache.hadoop.hbase.regionserver.Region;
 import org.apache.hadoop.hbase.replication.ReplicationEndpoint;
 
 public interface RegionServerObserver extends Coprocessor {
@@ -50,7 +50,7 @@ public interface RegionServerObserver extends Coprocessor {
    * @throws IOException
    */
   void preMerge(final ObserverContext<RegionServerCoprocessorEnvironment> ctx,
-      final HRegion regionA, final HRegion regionB) throws IOException;
+      final Region regionA, final Region regionB) throws IOException;
 
   /**
    * called after the regions merge.
@@ -61,7 +61,7 @@ public interface RegionServerObserver extends Coprocessor {
    * @throws IOException
    */
   void postMerge(final ObserverContext<RegionServerCoprocessorEnvironment> c,
-      final HRegion regionA, final HRegion regionB, final HRegion mergedRegion) throws IOException;
+      final Region regionA, final Region regionB, final Region mergedRegion) throws IOException;
 
   /**
    * This will be called before PONR step as part of regions merge transaction. Calling
@@ -74,7 +74,7 @@ public interface RegionServerObserver extends Coprocessor {
    * @throws IOException
    */
   void preMergeCommit(final ObserverContext<RegionServerCoprocessorEnvironment> ctx,
-      final HRegion regionA, final HRegion regionB,
+      final Region regionA, final Region regionB,
       @MetaMutationAnnotation List<Mutation> metaEntries) throws IOException;
 
   /**
@@ -86,7 +86,7 @@ public interface RegionServerObserver extends Coprocessor {
    * @throws IOException
    */
   void postMergeCommit(final ObserverContext<RegionServerCoprocessorEnvironment> ctx,
-      final HRegion regionA, final HRegion regionB, final HRegion mergedRegion) throws IOException;
+      final Region regionA, final Region regionB, final Region mergedRegion) throws IOException;
 
   /**
    * This will be called before the roll back of the regions merge.
@@ -96,7 +96,7 @@ public interface RegionServerObserver extends Coprocessor {
    * @throws IOException
    */
   void preRollBackMerge(final ObserverContext<RegionServerCoprocessorEnvironment> ctx,
-      final HRegion regionA, final HRegion regionB) throws IOException;
+      final Region regionA, final Region regionB) throws IOException;
 
   /**
    * This will be called after the roll back of the regions merge.
@@ -106,7 +106,7 @@ public interface RegionServerObserver extends Coprocessor {
    * @throws IOException
    */
   void postRollBackMerge(final ObserverContext<RegionServerCoprocessorEnvironment> ctx,
-      final HRegion regionA, final HRegion regionB) throws IOException;
+      final Region regionA, final Region regionB) throws IOException;
 
   /**
    * This will be called before executing user request to roll a region server WAL.

http://git-wip-us.apache.org/repos/asf/hbase/blob/af171593/hbase-server/src/main/java/org/apache/hadoop/hbase/master/RegionStateStore.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/RegionStateStore.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/RegionStateStore.java
index 18a781f..adfa48b 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/RegionStateStore.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/RegionStateStore.java
@@ -36,7 +36,7 @@ import org.apache.hadoop.hbase.MetaTableAccessor;
 import org.apache.hadoop.hbase.client.Put;
 import org.apache.hadoop.hbase.client.Result;
 import org.apache.hadoop.hbase.master.RegionState.State;
-import org.apache.hadoop.hbase.regionserver.HRegion;
+import org.apache.hadoop.hbase.regionserver.Region;
 import org.apache.hadoop.hbase.regionserver.RegionServerServices;
 import org.apache.hadoop.hbase.util.Bytes;
 import org.apache.hadoop.hbase.util.ConfigUtil;
@@ -57,7 +57,7 @@ public class RegionStateStore {
   /** The delimiter for meta columns for replicaIds > 0 */
   protected static final char META_REPLICA_ID_DELIMITER = '_';
 
-  private volatile HRegion metaRegion;
+  private volatile Region metaRegion;
   private MultiHConnection multiHConnection;
   private volatile boolean initialized;
 

http://git-wip-us.apache.org/repos/asf/hbase/blob/af171593/hbase-server/src/main/java/org/apache/hadoop/hbase/migration/NamespaceUpgrade.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/migration/NamespaceUpgrade.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/migration/NamespaceUpgrade.java
index d1bd167..034aac2 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/migration/NamespaceUpgrade.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/migration/NamespaceUpgrade.java
@@ -434,7 +434,7 @@ public class NamespaceUpgrade implements Tool {
         meta.delete(MetaTableAccessor.makeDeleteFromRegionInfo(oldRegionInfo));
       }
     } finally {
-      meta.flushcache();
+      meta.flush(true);
       meta.waitForFlushesAndCompactions();
       meta.close();
       walFactory.close();

http://git-wip-us.apache.org/repos/asf/hbase/blob/af171593/hbase-server/src/main/java/org/apache/hadoop/hbase/procedure/flush/FlushTableSubprocedure.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/procedure/flush/FlushTableSubprocedure.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/procedure/flush/FlushTableSubprocedure.java
index d032eba..8d64f2a 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/procedure/flush/FlushTableSubprocedure.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/procedure/flush/FlushTableSubprocedure.java
@@ -28,7 +28,8 @@ import org.apache.hadoop.hbase.errorhandling.ForeignExceptionDispatcher;
 import org.apache.hadoop.hbase.procedure.ProcedureMember;
 import org.apache.hadoop.hbase.procedure.Subprocedure;
 import org.apache.hadoop.hbase.procedure.flush.RegionServerFlushTableProcedureManager.FlushTableSubprocedurePool;
-import org.apache.hadoop.hbase.regionserver.HRegion;
+import org.apache.hadoop.hbase.regionserver.Region;
+import org.apache.hadoop.hbase.regionserver.Region.Operation;
 
 /**
  * This flush region implementation uses the distributed procedure framework to flush
@@ -40,12 +41,12 @@ public class FlushTableSubprocedure extends Subprocedure {
   private static final Log LOG = LogFactory.getLog(FlushTableSubprocedure.class);
 
   private final String table;
-  private final List<HRegion> regions;
+  private final List<Region> regions;
   private final FlushTableSubprocedurePool taskManager;
 
   public FlushTableSubprocedure(ProcedureMember member,
       ForeignExceptionDispatcher errorListener, long wakeFrequency, long timeout,
-      List<HRegion> regions, String table,
+      List<Region> regions, String table,
       FlushTableSubprocedurePool taskManager) {
     super(member, table, errorListener, wakeFrequency, timeout);
     this.table = table;
@@ -54,8 +55,8 @@ public class FlushTableSubprocedure extends Subprocedure {
   }
 
   private static class RegionFlushTask implements Callable<Void> {
-    HRegion region;
-    RegionFlushTask(HRegion region) {
+    Region region;
+    RegionFlushTask(Region region) {
       this.region = region;
     }
 
@@ -65,7 +66,7 @@ public class FlushTableSubprocedure extends Subprocedure {
       region.startRegionOperation();
       try {
         LOG.debug("Flush region " + region.toString() + " started...");
-        region.flushcache();
+        region.flush(true);
       } finally {
         LOG.debug("Closing region operation on " + region);
         region.closeRegionOperation();
@@ -89,7 +90,7 @@ public class FlushTableSubprocedure extends Subprocedure {
     }
 
     // Add all hfiles already existing in region.
-    for (HRegion region : regions) {
+    for (Region region : regions) {
       // submit one task per region for parallelize by region.
       taskManager.submitTask(new RegionFlushTask(region));
       monitor.rethrowException();

http://git-wip-us.apache.org/repos/asf/hbase/blob/af171593/hbase-server/src/main/java/org/apache/hadoop/hbase/procedure/flush/RegionServerFlushTableProcedureManager.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/procedure/flush/RegionServerFlushTableProcedureManager.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/procedure/flush/RegionServerFlushTableProcedureManager.java
index e6f074d..7664dee 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/procedure/flush/RegionServerFlushTableProcedureManager.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/procedure/flush/RegionServerFlushTableProcedureManager.java
@@ -44,8 +44,8 @@ import org.apache.hadoop.hbase.procedure.RegionServerProcedureManager;
 import org.apache.hadoop.hbase.procedure.Subprocedure;
 import org.apache.hadoop.hbase.procedure.SubprocedureFactory;
 import org.apache.hadoop.hbase.procedure.ZKProcedureMemberRpcs;
-import org.apache.hadoop.hbase.regionserver.HRegion;
 import org.apache.hadoop.hbase.regionserver.HRegionServer;
+import org.apache.hadoop.hbase.regionserver.Region;
 import org.apache.hadoop.hbase.regionserver.RegionServerServices;
 import org.apache.hadoop.hbase.zookeeper.ZooKeeperWatcher;
 import org.apache.zookeeper.KeeperException;
@@ -137,7 +137,7 @@ public class RegionServerFlushTableProcedureManager extends RegionServerProcedur
     }
 
     // check to see if this server is hosting any regions for the table
-    List<HRegion> involvedRegions;
+    List<Region> involvedRegions;
     try {
       involvedRegions = getRegionsToFlush(table);
     } catch (IOException e1) {
@@ -172,7 +172,7 @@ public class RegionServerFlushTableProcedureManager extends RegionServerProcedur
    * @return the list of online regions. Empty list is returned if no regions.
    * @throws IOException
    */
-  private List<HRegion> getRegionsToFlush(String table) throws IOException {
+  private List<Region> getRegionsToFlush(String table) throws IOException {
     return rss.getOnlineRegions(TableName.valueOf(table));
   }
 

http://git-wip-us.apache.org/repos/asf/hbase/blob/af171593/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/AnnotationReadingPriorityFunction.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/AnnotationReadingPriorityFunction.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/AnnotationReadingPriorityFunction.java
index ddeabfa..29228db 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/AnnotationReadingPriorityFunction.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/AnnotationReadingPriorityFunction.java
@@ -176,10 +176,11 @@ class AnnotationReadingPriorityFunction implements PriorityFunction {
       if (hasRegion != null && (Boolean)hasRegion.invoke(param, (Object[])null)) {
         Method getRegion = methodMap.get("getRegion").get(rpcArgClass);
         regionSpecifier = (RegionSpecifier)getRegion.invoke(param, (Object[])null);
-        HRegion region = rpcServices.getRegion(regionSpecifier);
+        Region region = rpcServices.getRegion(regionSpecifier);
         if (region.getRegionInfo().isSystemTable()) {
           if (LOG.isTraceEnabled()) {
-            LOG.trace("High priority because region=" + region.getRegionNameAsString());
+            LOG.trace("High priority because region=" +
+              region.getRegionInfo().getRegionNameAsString());
           }
           return HConstants.SYSTEMTABLE_QOS;
         }

http://git-wip-us.apache.org/repos/asf/hbase/blob/af171593/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/CompactSplitThread.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/CompactSplitThread.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/CompactSplitThread.java
index acf92b3..3e3e398 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/CompactSplitThread.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/CompactSplitThread.java
@@ -218,8 +218,8 @@ public class CompactSplitThread implements CompactionRequestor, PropagatingConfi
     return queueLists.toString();
   }
 
-  public synchronized void requestRegionsMerge(final HRegion a,
-      final HRegion b, final boolean forcible) {
+  public synchronized void requestRegionsMerge(final Region a,
+      final Region b, final boolean forcible) {
     try {
       mergePool.execute(new RegionMergeRequest(a, b, this.server, forcible));
       if (LOG.isDebugEnabled()) {
@@ -232,10 +232,10 @@ public class CompactSplitThread implements CompactionRequestor, PropagatingConfi
     }
   }
 
-  public synchronized boolean requestSplit(final HRegion r) {
+  public synchronized boolean requestSplit(final Region r) {
     // don't split regions that are blocking
-    if (shouldSplitRegion() && r.getCompactPriority() >= Store.PRIORITY_USER) {
-      byte[] midKey = r.checkSplit();
+    if (shouldSplitRegion() && ((HRegion)r).getCompactPriority() >= Store.PRIORITY_USER) {
+      byte[] midKey = ((HRegion)r).checkSplit();
       if (midKey != null) {
         requestSplit(r, midKey);
         return true;
@@ -244,12 +244,12 @@ public class CompactSplitThread implements CompactionRequestor, PropagatingConfi
     return false;
   }
 
-  public synchronized void requestSplit(final HRegion r, byte[] midKey) {
+  public synchronized void requestSplit(final Region r, byte[] midKey) {
     if (midKey == null) {
-      LOG.debug("Region " + r.getRegionNameAsString() +
+      LOG.debug("Region " + r.getRegionInfo().getRegionNameAsString() +
         " not splittable because midkey=null");
-      if (r.shouldForceSplit()) {
-        r.clearSplit();
+      if (((HRegion)r).shouldForceSplit()) {
+        ((HRegion)r).clearSplit();
       }
       return;
     }
@@ -264,36 +264,36 @@ public class CompactSplitThread implements CompactionRequestor, PropagatingConfi
   }
 
   @Override
-  public synchronized List<CompactionRequest> requestCompaction(final HRegion r, final String why)
+  public synchronized List<CompactionRequest> requestCompaction(final Region r, final String why)
       throws IOException {
     return requestCompaction(r, why, null);
   }
 
   @Override
-  public synchronized List<CompactionRequest> requestCompaction(final HRegion r, final String why,
+  public synchronized List<CompactionRequest> requestCompaction(final Region r, final String why,
       List<Pair<CompactionRequest, Store>> requests) throws IOException {
     return requestCompaction(r, why, Store.NO_PRIORITY, requests);
   }
 
   @Override
-  public synchronized CompactionRequest requestCompaction(final HRegion r, final Store s,
+  public synchronized CompactionRequest requestCompaction(final Region r, final Store s,
       final String why, CompactionRequest request) throws IOException {
     return requestCompaction(r, s, why, Store.NO_PRIORITY, request);
   }
 
   @Override
-  public synchronized List<CompactionRequest> requestCompaction(final HRegion r, final String why,
+  public synchronized List<CompactionRequest> requestCompaction(final Region r, final String why,
       int p, List<Pair<CompactionRequest, Store>> requests) throws IOException {
     return requestCompactionInternal(r, why, p, requests, true);
   }
 
-  private List<CompactionRequest> requestCompactionInternal(final HRegion r, final String why,
+  private List<CompactionRequest> requestCompactionInternal(final Region r, final String why,
       int p, List<Pair<CompactionRequest, Store>> requests, boolean selectNow) throws IOException {
     // not a special compaction request, so make our own list
     List<CompactionRequest> ret = null;
     if (requests == null) {
       ret = selectNow ? new ArrayList<CompactionRequest>(r.getStores().size()) : null;
-      for (Store s : r.getStores().values()) {
+      for (Store s : r.getStores()) {
         CompactionRequest cr = requestCompactionInternal(r, s, why, p, null, selectNow);
         if (selectNow) ret.add(cr);
       }
@@ -307,30 +307,30 @@ public class CompactSplitThread implements CompactionRequestor, PropagatingConfi
     return ret;
   }
 
-  public CompactionRequest requestCompaction(final HRegion r, final Store s,
+  public CompactionRequest requestCompaction(final Region r, final Store s,
       final String why, int priority, CompactionRequest request) throws IOException {
     return requestCompactionInternal(r, s, why, priority, request, true);
   }
 
   public synchronized void requestSystemCompaction(
-      final HRegion r, final String why) throws IOException {
+      final Region r, final String why) throws IOException {
     requestCompactionInternal(r, why, Store.NO_PRIORITY, null, false);
   }
 
   public void requestSystemCompaction(
-      final HRegion r, final Store s, final String why) throws IOException {
+      final Region r, final Store s, final String why) throws IOException {
     requestCompactionInternal(r, s, why, Store.NO_PRIORITY, null, false);
   }
 
   /**
-   * @param r HRegion store belongs to
+   * @param r region store belongs to
    * @param s Store to request compaction on
    * @param why Why compaction requested -- used in debug messages
    * @param priority override the default priority (NO_PRIORITY == decide)
    * @param request custom compaction request. Can be <tt>null</tt> in which case a simple
    *          compaction will be used.
    */
-  private synchronized CompactionRequest requestCompactionInternal(final HRegion r, final Store s,
+  private synchronized CompactionRequest requestCompactionInternal(final Region r, final Store s,
       final String why, int priority, CompactionRequest request, boolean selectNow)
           throws IOException {
     if (this.server.isStopped()
@@ -358,12 +358,12 @@ public class CompactSplitThread implements CompactionRequestor, PropagatingConfi
     return selectNow ? compaction.getRequest() : null;
   }
 
-  private CompactionContext selectCompaction(final HRegion r, final Store s,
+  private CompactionContext selectCompaction(final Region r, final Store s,
       int priority, CompactionRequest request) throws IOException {
     CompactionContext compaction = s.requestCompaction(priority, request);
     if (compaction == null) {
       if(LOG.isDebugEnabled()) {
-        LOG.debug("Not compacting " + r.getRegionNameAsString() +
+        LOG.debug("Not compacting " + r.getRegionInfo().getRegionNameAsString() +
             " because compaction request was cancelled");
       }
       return null;
@@ -454,11 +454,11 @@ public class CompactSplitThread implements CompactionRequestor, PropagatingConfi
     private int queuedPriority;
     private ThreadPoolExecutor parent;
 
-    public CompactionRunner(Store store, HRegion region,
+    public CompactionRunner(Store store, Region region,
         CompactionContext compaction, ThreadPoolExecutor parent) {
       super();
       this.store = store;
-      this.region = region;
+      this.region = (HRegion)region;
       this.compaction = compaction;
       this.queuedPriority = (this.compaction == null)
           ? store.getCompactPriority() : compaction.getRequest().getPriority();

http://git-wip-us.apache.org/repos/asf/hbase/blob/af171593/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/CompactionRequestor.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/CompactionRequestor.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/CompactionRequestor.java
index 93a73e9..d40b21d 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/CompactionRequestor.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/CompactionRequestor.java
@@ -34,7 +34,7 @@ public interface CompactionRequestor {
    *         compactions were started
    * @throws IOException
    */
-  List<CompactionRequest> requestCompaction(final HRegion r, final String why)
+  List<CompactionRequest> requestCompaction(final Region r, final String why)
       throws IOException;
 
   /**
@@ -48,7 +48,7 @@ public interface CompactionRequestor {
    * @throws IOException
    */
   List<CompactionRequest> requestCompaction(
-    final HRegion r, final String why, List<Pair<CompactionRequest, Store>> requests
+    final Region r, final String why, List<Pair<CompactionRequest, Store>> requests
   )
       throws IOException;
 
@@ -56,13 +56,13 @@ public interface CompactionRequestor {
    * @param r Region to compact
    * @param s Store within region to compact
    * @param why Why compaction was requested -- used in debug messages
-   * @param request custom compaction request for the {@link HRegion} and {@link Store}. Custom
+   * @param request custom compaction request for the {@link Region} and {@link Store}. Custom
    *          request must be <tt>null</tt> or be constructed with matching region and store.
    * @return The created {@link CompactionRequest} or <tt>null</tt> if no compaction was started.
    * @throws IOException
    */
   CompactionRequest requestCompaction(
-    final HRegion r, final Store s, final String why, CompactionRequest request
+    final Region r, final Store s, final String why, CompactionRequest request
   ) throws IOException;
 
   /**
@@ -77,7 +77,7 @@ public interface CompactionRequestor {
    * @throws IOException
    */
   List<CompactionRequest> requestCompaction(
-    final HRegion r, final String why, int pri, List<Pair<CompactionRequest, Store>> requests
+    final Region r, final String why, int pri, List<Pair<CompactionRequest, Store>> requests
   ) throws IOException;
 
   /**
@@ -85,12 +85,12 @@ public interface CompactionRequestor {
    * @param s Store within region to compact
    * @param why Why compaction was requested -- used in debug messages
    * @param pri Priority of this compaction. minHeap. <=0 is critical
-   * @param request custom compaction request to run. {@link Store} and {@link HRegion} for the
+   * @param request custom compaction request to run. {@link Store} and {@link Region} for the
    *          request must match the region and store specified here.
    * @return The created {@link CompactionRequest} or <tt>null</tt> if no compaction was started
    * @throws IOException
    */
   CompactionRequest requestCompaction(
-    final HRegion r, final Store s, final String why, int pri, CompactionRequest request
+    final Region r, final Store s, final String why, int pri, CompactionRequest request
   ) throws IOException;
 }

http://git-wip-us.apache.org/repos/asf/hbase/blob/af171593/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/ConstantSizeRegionSplitPolicy.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/ConstantSizeRegionSplitPolicy.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/ConstantSizeRegionSplitPolicy.java
index fba5b2a..2459ae6 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/ConstantSizeRegionSplitPolicy.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/ConstantSizeRegionSplitPolicy.java
@@ -55,7 +55,7 @@ public class ConstantSizeRegionSplitPolicy extends RegionSplitPolicy {
     boolean force = region.shouldForceSplit();
     boolean foundABigStore = false;
 
-    for (Store store : region.getStores().values()) {
+    for (Store store : region.getStores()) {
       // If any of the stores are unable to split (eg they contain reference files)
       // then don't split
       if ((!store.canSplit())) {

http://git-wip-us.apache.org/repos/asf/hbase/blob/af171593/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/FavoredNodesForRegion.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/FavoredNodesForRegion.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/FavoredNodesForRegion.java
index d978a2d..f516ecd 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/FavoredNodesForRegion.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/FavoredNodesForRegion.java
@@ -21,15 +21,18 @@ package org.apache.hadoop.hbase.regionserver;
 import java.net.InetSocketAddress;
 import java.util.List; 
 
+import org.apache.hadoop.hbase.HBaseInterfaceAudience;
 import org.apache.hadoop.hbase.classification.InterfaceAudience;
+import org.apache.hadoop.hbase.classification.InterfaceStability;
 import org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.ServerName;
 
 /**
  * Abstraction that allows different modules in RegionServer to update/get
  * the favored nodes information for regions. 
  */
-@InterfaceAudience.Private
-interface FavoredNodesForRegion {
+@InterfaceAudience.LimitedPrivate(HBaseInterfaceAudience.COPROC)
+@InterfaceStability.Evolving
+public interface FavoredNodesForRegion {
   /**
    * Used to update the favored nodes mapping when required.
    * @param encodedRegionName

http://git-wip-us.apache.org/repos/asf/hbase/blob/af171593/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/FlushRequestListener.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/FlushRequestListener.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/FlushRequestListener.java
index 80ac07b..0e6bc4f 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/FlushRequestListener.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/FlushRequestListener.java
@@ -32,5 +32,5 @@ public interface FlushRequestListener {
    * @param type The type of flush. (ie. Whether a normal flush or flush because of global heap preassure)
    * @param region The region for which flush is requested
    */
-  void flushRequested(FlushType type, HRegion region);
+  void flushRequested(FlushType type, Region region);
 }

http://git-wip-us.apache.org/repos/asf/hbase/blob/af171593/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/FlushRequester.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/FlushRequester.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/FlushRequester.java
index 7517454..c7e155a 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/FlushRequester.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/FlushRequester.java
@@ -29,21 +29,21 @@ public interface FlushRequester {
   /**
    * Tell the listener the cache needs to be flushed.
    *
-   * @param region the HRegion requesting the cache flush
+   * @param region the Region requesting the cache flush
    * @param forceFlushAllStores whether we want to flush all stores. e.g., when request from log
    *          rolling.
    */
-  void requestFlush(HRegion region, boolean forceFlushAllStores);
+  void requestFlush(Region region, boolean forceFlushAllStores);
 
   /**
    * Tell the listener the cache needs to be flushed after a delay
    *
-   * @param region the HRegion requesting the cache flush
+   * @param region the Region requesting the cache flush
    * @param delay after how much time should the flush happen
    * @param forceFlushAllStores whether we want to flush all stores. e.g., when request from log
    *          rolling.
    */
-  void requestDelayedFlush(HRegion region, long delay, boolean forceFlushAllStores);
+  void requestDelayedFlush(Region region, long delay, boolean forceFlushAllStores);
 
   /**
    * Register a FlushRequestListener


Mime
View raw message