hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anoopsamj...@apache.org
Subject [1/2] hbase git commit: HBASE-18298 RegionServerServices Interface cleanup for CP expose.
Date Wed, 27 Sep 2017 05:32:21 GMT
Repository: hbase
Updated Branches:
  refs/heads/master 417dad646 -> bd68551f2


http://git-wip-us.apache.org/repos/asf/hbase/blob/bd68551f/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestBlockEvictionFromClient.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestBlockEvictionFromClient.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestBlockEvictionFromClient.java
index 08ec09b..e1b31e7 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestBlockEvictionFromClient.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestBlockEvictionFromClient.java
@@ -182,8 +182,7 @@ public class TestBlockEvictionFromClient {
       // get the block cache and region
       RegionLocator locator = TEST_UTIL.getConnection().getRegionLocator(tableName);
       String regionName = locator.getAllRegionLocations().get(0).getRegionInfo().getEncodedName();
-      Region region = TEST_UTIL.getRSForFirstRegionInTable(tableName).getFromOnlineRegions(
-          regionName);
+      Region region = TEST_UTIL.getRSForFirstRegionInTable(tableName).getRegion(regionName);
       Store store = region.getStores().iterator().next();
       CacheConfig cacheConf = store.getCacheConfig();
       cacheConf.setCacheDataOnWrite(true);
@@ -273,8 +272,7 @@ public class TestBlockEvictionFromClient {
       // get the block cache and region
       RegionLocator locator = TEST_UTIL.getConnection().getRegionLocator(tableName);
       String regionName = locator.getAllRegionLocations().get(0).getRegionInfo().getEncodedName();
-      Region region = TEST_UTIL.getRSForFirstRegionInTable(tableName).getFromOnlineRegions(
-          regionName);
+      Region region = TEST_UTIL.getRSForFirstRegionInTable(tableName).getRegion(regionName);
       Store store = region.getStores().iterator().next();
       CacheConfig cacheConf = store.getCacheConfig();
       cacheConf.setCacheDataOnWrite(true);
@@ -332,8 +330,7 @@ public class TestBlockEvictionFromClient {
       // get the block cache and region
       RegionLocator locator = TEST_UTIL.getConnection().getRegionLocator(tableName);
       String regionName = locator.getAllRegionLocations().get(0).getRegionInfo().getEncodedName();
-      Region region = TEST_UTIL.getRSForFirstRegionInTable(tableName).getFromOnlineRegions(
-          regionName);
+      Region region = TEST_UTIL.getRSForFirstRegionInTable(tableName).getRegion(regionName);
       Store store = region.getStores().iterator().next();
       CacheConfig cacheConf = store.getCacheConfig();
       cacheConf.setCacheDataOnWrite(true);
@@ -394,8 +391,7 @@ public class TestBlockEvictionFromClient {
       // get the block cache and region
       RegionLocator locator = TEST_UTIL.getConnection().getRegionLocator(tableName);
       String regionName = locator.getAllRegionLocations().get(0).getRegionInfo().getEncodedName();
-      Region region = TEST_UTIL.getRSForFirstRegionInTable(tableName).getFromOnlineRegions(
-          regionName);
+      Region region = TEST_UTIL.getRSForFirstRegionInTable(tableName).getRegion(regionName);
       BlockCache cache = setCacheProperties(region);
       Put put = new Put(ROW);
       put.addColumn(FAMILY, QUALIFIER, data);
@@ -487,8 +483,7 @@ public class TestBlockEvictionFromClient {
       // get the block cache and region
       RegionLocator locator = TEST_UTIL.getConnection().getRegionLocator(tableName);
       String regionName = locator.getAllRegionLocations().get(0).getRegionInfo().getEncodedName();
-      Region region = TEST_UTIL.getRSForFirstRegionInTable(tableName).getFromOnlineRegions(
-          regionName);
+      Region region = TEST_UTIL.getRSForFirstRegionInTable(tableName).getRegion(regionName);
       BlockCache cache = setCacheProperties(region);
 
       Put put = new Put(ROW);
@@ -571,8 +566,7 @@ public class TestBlockEvictionFromClient {
       // get the block cache and region
       RegionLocator locator = TEST_UTIL.getConnection().getRegionLocator(tableName);
       String regionName = locator.getAllRegionLocations().get(0).getRegionInfo().getEncodedName();
-      Region region =
-          TEST_UTIL.getRSForFirstRegionInTable(tableName).getFromOnlineRegions(regionName);
+      Region region = TEST_UTIL.getRSForFirstRegionInTable(tableName).getRegion(regionName);
       Store store = region.getStores().iterator().next();
       CacheConfig cacheConf = store.getCacheConfig();
       cacheConf.setEvictOnClose(true);
@@ -630,8 +624,7 @@ public class TestBlockEvictionFromClient {
       // get the block cache and region
       RegionLocator locator = TEST_UTIL.getConnection().getRegionLocator(tableName);
       String regionName = locator.getAllRegionLocations().get(0).getRegionInfo().getEncodedName();
-      Region region = TEST_UTIL.getRSForFirstRegionInTable(tableName).getFromOnlineRegions(
-          regionName);
+      Region region = TEST_UTIL.getRSForFirstRegionInTable(tableName).getRegion(regionName);
       Store store = region.getStores().iterator().next();
       CacheConfig cacheConf = store.getCacheConfig();
       cacheConf.setCacheDataOnWrite(true);
@@ -713,8 +706,7 @@ public class TestBlockEvictionFromClient {
       // get the block cache and region
       RegionLocator locator = TEST_UTIL.getConnection().getRegionLocator(tableName);
       String regionName = locator.getAllRegionLocations().get(0).getRegionInfo().getEncodedName();
-      Region region = TEST_UTIL.getRSForFirstRegionInTable(tableName).getFromOnlineRegions(
-          regionName);
+      Region region = TEST_UTIL.getRSForFirstRegionInTable(tableName).getRegion(regionName);
       BlockCache cache = setCacheProperties(region);
 
       Put put = new Put(ROW);
@@ -813,8 +805,7 @@ public class TestBlockEvictionFromClient {
       // get the block cache and region
       RegionLocator locator = TEST_UTIL.getConnection().getRegionLocator(tableName);
       String regionName = locator.getAllRegionLocations().get(0).getRegionInfo().getEncodedName();
-      Region region = TEST_UTIL.getRSForFirstRegionInTable(tableName).getFromOnlineRegions(
-          regionName);
+      Region region = TEST_UTIL.getRSForFirstRegionInTable(tableName).getRegion(regionName);
       Store store = region.getStores().iterator().next();
       CacheConfig cacheConf = store.getCacheConfig();
       cacheConf.setCacheDataOnWrite(true);
@@ -879,8 +870,7 @@ public class TestBlockEvictionFromClient {
       // get the block cache and region
       RegionLocator locator = TEST_UTIL.getConnection().getRegionLocator(tableName);
       String regionName = locator.getAllRegionLocations().get(0).getRegionInfo().getEncodedName();
-      Region region = TEST_UTIL.getRSForFirstRegionInTable(tableName).getFromOnlineRegions(
-          regionName);
+      Region region = TEST_UTIL.getRSForFirstRegionInTable(tableName).getRegion(regionName);
       Store store = region.getStores().iterator().next();
       CacheConfig cacheConf = store.getCacheConfig();
       cacheConf.setCacheDataOnWrite(true);
@@ -997,8 +987,7 @@ public class TestBlockEvictionFromClient {
       // get the block cache and region
       RegionLocator locator = TEST_UTIL.getConnection().getRegionLocator(tableName);
       String regionName = locator.getAllRegionLocations().get(0).getRegionInfo().getEncodedName();
-      Region region = TEST_UTIL.getRSForFirstRegionInTable(tableName).getFromOnlineRegions(
-          regionName);
+      Region region = TEST_UTIL.getRSForFirstRegionInTable(tableName).getRegion(regionName);
       Store store = region.getStores().iterator().next();
       CacheConfig cacheConf = store.getCacheConfig();
       cacheConf.setCacheDataOnWrite(true);
@@ -1127,8 +1116,7 @@ public class TestBlockEvictionFromClient {
       // get the block cache and region
       RegionLocator locator = TEST_UTIL.getConnection().getRegionLocator(tableName);
       String regionName = locator.getAllRegionLocations().get(0).getRegionInfo().getEncodedName();
-      Region region = TEST_UTIL.getRSForFirstRegionInTable(tableName).getFromOnlineRegions(
-          regionName);
+      Region region = TEST_UTIL.getRSForFirstRegionInTable(tableName).getRegion(regionName);
       Store store = region.getStores().iterator().next();
       CacheConfig cacheConf = store.getCacheConfig();
       cacheConf.setCacheDataOnWrite(true);

http://git-wip-us.apache.org/repos/asf/hbase/blob/bd68551f/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestClientPushback.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestClientPushback.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestClientPushback.java
index cafb2f6..1b1805e 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestClientPushback.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestClientPushback.java
@@ -96,7 +96,7 @@ public class TestClientPushback {
     BufferedMutatorImpl mutator = (BufferedMutatorImpl) conn.getBufferedMutator(tableName);
 
     HRegionServer rs = UTIL.getHBaseCluster().getRegionServer(0);
-    Region region = rs.getOnlineRegions(tableName).get(0);
+    Region region = rs.getRegions(tableName).get(0);
 
     LOG.debug("Writing some data to "+tableName);
     // write some data
@@ -183,7 +183,7 @@ public class TestClientPushback {
     ClusterConnection conn = (ClusterConnection) ConnectionFactory.createConnection(conf);
     Table table = conn.getTable(tableName);
     HRegionServer rs = UTIL.getHBaseCluster().getRegionServer(0);
-    Region region = rs.getOnlineRegions(tableName).get(0);
+    Region region = rs.getRegions(tableName).get(0);
 
     RowMutations mutations = new RowMutations(Bytes.toBytes("row"));
     Put p = new Put(Bytes.toBytes("row"));

http://git-wip-us.apache.org/repos/asf/hbase/blob/bd68551f/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestFromClientSide.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestFromClientSide.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestFromClientSide.java
index aaddd34..10169ab 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestFromClientSide.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestFromClientSide.java
@@ -4528,8 +4528,7 @@ public class TestFromClientSide {
       // set block size to 64 to making 2 kvs into one block, bypassing the walkForwardInSingleRow
       // in Store.rowAtOrBeforeFromStoreFile
       String regionName = locator.getAllRegionLocations().get(0).getRegionInfo().getEncodedName();
-      Region region =
-          TEST_UTIL.getRSForFirstRegionInTable(tableName).getFromOnlineRegions(regionName);
+      Region region = TEST_UTIL.getRSForFirstRegionInTable(tableName).getRegion(regionName);
       Put put1 = new Put(firstRow);
       Put put2 = new Put(secondRow);
       Put put3 = new Put(thirdRow);
@@ -5295,8 +5294,7 @@ public class TestFromClientSide {
       // get the block cache and region
       String regionName = locator.getAllRegionLocations().get(0).getRegionInfo().getEncodedName();
 
-      Region region = TEST_UTIL.getRSForFirstRegionInTable(tableName)
-          .getFromOnlineRegions(regionName);
+      Region region = TEST_UTIL.getRSForFirstRegionInTable(tableName).getRegion(regionName);
       Store store = region.getStores().iterator().next();
       CacheConfig cacheConf = store.getCacheConfig();
       cacheConf.setCacheDataOnWrite(true);

http://git-wip-us.apache.org/repos/asf/hbase/blob/bd68551f/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestFromClientSide3.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestFromClientSide3.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestFromClientSide3.java
index 7b6c9a8..89ea5b7 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestFromClientSide3.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestFromClientSide3.java
@@ -961,7 +961,7 @@ public class TestFromClientSide3 {
   private static Region find(final TableName tableName)
       throws IOException, InterruptedException {
     HRegionServer rs = TEST_UTIL.getRSForFirstRegionInTable(tableName);
-    List<Region> regions = rs.getOnlineRegions(tableName);
+    List<Region> regions = rs.getRegions(tableName);
     assertEquals(1, regions.size());
     return regions.get(0);
   }

http://git-wip-us.apache.org/repos/asf/hbase/blob/bd68551f/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestHCM.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestHCM.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestHCM.java
index 1040a66..56c8c7c 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestHCM.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestHCM.java
@@ -1328,7 +1328,7 @@ public class TestHCM {
       assertTrue(!destServerName.equals(metaServerName));
 
        //find another row in the cur server that is less than ROW_X
-      List<Region> regions = curServer.getOnlineRegions(TABLE_NAME3);
+      List<Region> regions = curServer.getRegions(TABLE_NAME3);
       byte[] otherRow = null;
        for (Region region : regions) {
          if (!region.getRegionInfo().getEncodedName().equals(toMove.getRegionInfo().getEncodedName())

http://git-wip-us.apache.org/repos/asf/hbase/blob/bd68551f/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestMultiRespectsLimits.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestMultiRespectsLimits.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestMultiRespectsLimits.java
index a7b9e68..f718773 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestMultiRespectsLimits.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestMultiRespectsLimits.java
@@ -159,7 +159,7 @@ public class TestMultiRespectsLimits {
       TEST_UTIL.waitFor(60000, new Waiter.Predicate<Exception>() {
         @Override
         public boolean evaluate() throws Exception {
-          return regionServer.getOnlineRegions(tableName).get(0).getMaxFlushedSeqId() > 3;
+          return regionServer.getRegions(tableName).get(0).getMaxFlushedSeqId() > 3;
         }
       });
     }

http://git-wip-us.apache.org/repos/asf/hbase/blob/bd68551f/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestReplicaWithCluster.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestReplicaWithCluster.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestReplicaWithCluster.java
index 7661ed4..264c646 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestReplicaWithCluster.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestReplicaWithCluster.java
@@ -134,7 +134,7 @@ public class TestReplicaWithCluster {
       if (e.getEnvironment().getRegion().getRegionInfo().getReplicaId() <= 1) {
         LOG.info("Throw Region Server Stopped Exceptoin for replica id " + replicaId);
         throw new RegionServerStoppedException("Server " +
-            e.getEnvironment().getRegionServerServices().getServerName()
+            e.getEnvironment().getCoprocessorRegionServerServices().getServerName()
             + " not running");
       } else {
         LOG.info("We're replica region " + replicaId);
@@ -151,7 +151,7 @@ public class TestReplicaWithCluster {
       if (e.getEnvironment().getRegion().getRegionInfo().getReplicaId() <= 1) {
         LOG.info("Throw Region Server Stopped Exceptoin for replica id " + replicaId);
         throw new RegionServerStoppedException("Server " +
-            e.getEnvironment().getRegionServerServices().getServerName()
+            e.getEnvironment().getCoprocessorRegionServerServices().getServerName()
             + " not running");
       } else {
         LOG.info("We're replica region " + replicaId);
@@ -179,8 +179,9 @@ public class TestReplicaWithCluster {
         if (!e.getEnvironment().getRegion().getRegionInfo().isMetaRegion() && (replicaId == 0)) {
           LOG.info("Get, throw Region Server Stopped Exceptoin for region " + e.getEnvironment()
               .getRegion().getRegionInfo());
-          throw new RegionServerStoppedException("Server " +
-              e.getEnvironment().getRegionServerServices().getServerName() + " not running");
+          throw new RegionServerStoppedException(
+              "Server " + e.getEnvironment().getCoprocessorRegionServerServices().getServerName()
+                  + " not running");
         }
       } else {
         LOG.info("Get, We're replica region " + replicaId);
@@ -209,8 +210,9 @@ public class TestReplicaWithCluster {
           LOG.info("Scan, throw Region Server Stopped Exceptoin for replica " + e.getEnvironment()
               .getRegion().getRegionInfo());
 
-          throw new RegionServerStoppedException("Server " +
-              e.getEnvironment().getRegionServerServices().getServerName() + " not running");
+          throw new RegionServerStoppedException(
+              "Server " + e.getEnvironment().getCoprocessorRegionServerServices().getServerName()
+                  + " not running");
         } else {
           LOG.info("Scan, We're replica region " + replicaId);
         }

http://git-wip-us.apache.org/repos/asf/hbase/blob/bd68551f/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 ba1e222..5868bf9 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
@@ -53,7 +53,6 @@ import org.apache.hadoop.hbase.io.Reference;
 import org.apache.hadoop.hbase.io.hfile.CacheConfig;
 import org.apache.hadoop.hbase.regionserver.InternalScanner;
 import org.apache.hadoop.hbase.regionserver.KeyValueScanner;
-import org.apache.hadoop.hbase.regionserver.Leases;
 import org.apache.hadoop.hbase.regionserver.MiniBatchOperationInProgress;
 import org.apache.hadoop.hbase.regionserver.Region.Operation;
 import org.apache.hadoop.hbase.regionserver.RegionScanner;
@@ -137,12 +136,6 @@ public class SimpleRegionObserver implements RegionObserver {
 
   @Override
   public void start(CoprocessorEnvironment e) throws IOException {
-    // this only makes sure that leases and locks are available to coprocessors
-    // from external packages
-    RegionCoprocessorEnvironment re = (RegionCoprocessorEnvironment)e;
-    Leases leases = re.getRegionServerServices().getLeases();
-    leases.createLease(re.getRegion().getRegionInfo().getRegionNameAsString(), 2000, null);
-    leases.cancelLease(re.getRegion().getRegionInfo().getRegionNameAsString());
   }
 
   @Override

http://git-wip-us.apache.org/repos/asf/hbase/blob/bd68551f/hbase-server/src/test/java/org/apache/hadoop/hbase/coprocessor/TestRegionObserverScannerOpenHook.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/coprocessor/TestRegionObserverScannerOpenHook.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/coprocessor/TestRegionObserverScannerOpenHook.java
index afeb763..7b24c1f 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/coprocessor/TestRegionObserverScannerOpenHook.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/coprocessor/TestRegionObserverScannerOpenHook.java
@@ -300,7 +300,7 @@ public class TestRegionObserverScannerOpenHook {
     table.put(put);
 
     HRegionServer rs = UTIL.getRSForFirstRegionInTable(desc.getTableName());
-    List<Region> regions = rs.getOnlineRegions(desc.getTableName());
+    List<Region> regions = rs.getRegions(desc.getTableName());
     assertEquals("More than 1 region serving test table with 1 row", 1, regions.size());
     Region region = regions.get(0);
     admin.flushRegion(region.getRegionInfo().getRegionName());

http://git-wip-us.apache.org/repos/asf/hbase/blob/bd68551f/hbase-server/src/test/java/org/apache/hadoop/hbase/fs/TestBlockReorder.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/fs/TestBlockReorder.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/fs/TestBlockReorder.java
index 5b9ef2e..706c463 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/fs/TestBlockReorder.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/fs/TestBlockReorder.java
@@ -292,7 +292,7 @@ public class TestBlockReorder {
 
     int nbTest = 0;
     while (nbTest < 10) {
-      final List<Region> regions = targetRs.getOnlineRegions(h.getName());
+      final List<Region> regions = targetRs.getRegions(h.getName());
       final CountDownLatch latch = new CountDownLatch(regions.size());
       // listen for successful log rolls
       final WALActionsListener listener = new WALActionsListener.Base() {

http://git-wip-us.apache.org/repos/asf/hbase/blob/bd68551f/hbase-server/src/test/java/org/apache/hadoop/hbase/master/MockRegionServer.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/MockRegionServer.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/master/MockRegionServer.java
index ba18299..450bf8e 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/MockRegionServer.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/master/MockRegionServer.java
@@ -263,18 +263,18 @@ ClientProtos.ClientService.BlockingInterface, RegionServerServices {
   }
 
   @Override
-  public void addToOnlineRegions(Region r) {
+  public void addRegion(Region r) {
     // TODO Auto-generated method stub
   }
 
   @Override
-  public boolean removeFromOnlineRegions(Region r, ServerName destination) {
+  public boolean removeRegion(Region r, ServerName destination) {
     // TODO Auto-generated method stub
     return false;
   }
 
   @Override
-  public HRegion getFromOnlineRegions(String encodedRegionName) {
+  public HRegion getRegion(String encodedRegionName) {
     // TODO Auto-generated method stub
     return null;
   }
@@ -468,7 +468,7 @@ ClientProtos.ClientService.BlockingInterface, RegionServerServices {
   }
 
   @Override
-  public List<Region> getOnlineRegions() {
+  public List<Region> getRegions() {
     return null;
   }
 
@@ -535,7 +535,7 @@ ClientProtos.ClientService.BlockingInterface, RegionServerServices {
   }
 
   @Override
-  public List<Region> getOnlineRegions(TableName tableName) throws IOException {
+  public List<Region> getRegions(TableName tableName) throws IOException {
     // TODO Auto-generated method stub
     return null;
   }

http://git-wip-us.apache.org/repos/asf/hbase/blob/bd68551f/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestAssignmentListener.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestAssignmentListener.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestAssignmentListener.java
index 95c0615..eaa2edb 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestAssignmentListener.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestAssignmentListener.java
@@ -258,7 +258,7 @@ public class TestAssignmentListener {
         admin.majorCompact(tableName);
         mergeable = 0;
         for (JVMClusterUtil.RegionServerThread regionThread: miniCluster.getRegionServerThreads()) {
-          for (Region region: regionThread.getRegionServer().getOnlineRegions(tableName)) {
+          for (Region region: regionThread.getRegionServer().getRegions(tableName)) {
             mergeable += ((HRegion)region).isMergeable() ? 1 : 0;
           }
         }
@@ -299,7 +299,7 @@ public class TestAssignmentListener {
     MiniHBaseCluster miniCluster = TEST_UTIL.getMiniHBaseCluster();
     int serverCount = 0;
     for (JVMClusterUtil.RegionServerThread regionThread: miniCluster.getRegionServerThreads()) {
-      if (!regionThread.getRegionServer().getOnlineRegions(TABLE_NAME).isEmpty()) {
+      if (!regionThread.getRegionServer().getRegions(TABLE_NAME).isEmpty()) {
         ++serverCount;
       }
       if (serverCount > 1) {

http://git-wip-us.apache.org/repos/asf/hbase/blob/bd68551f/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestGetLastFlushedSequenceId.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestGetLastFlushedSequenceId.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestGetLastFlushedSequenceId.java
index 5aa2176..01505b8 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestGetLastFlushedSequenceId.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestGetLastFlushedSequenceId.java
@@ -80,7 +80,7 @@ public class TestGetLastFlushedSequenceId {
     Region region = null;
     for (int i = 0; i < cluster.getRegionServerThreads().size(); i++) {
       HRegionServer hrs = rsts.get(i).getRegionServer();
-      for (Region r : hrs.getOnlineRegions(tableName)) {
+      for (Region r : hrs.getRegions(tableName)) {
         region = r;
         break;
       }

http://git-wip-us.apache.org/repos/asf/hbase/blob/bd68551f/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestMasterFailover.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestMasterFailover.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestMasterFailover.java
index 5142437..c1eaef7 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestMasterFailover.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestMasterFailover.java
@@ -225,8 +225,8 @@ public class TestMasterFailover {
     // region server should expire (how it can be verified?)
     MetaTableLocator.setMetaLocation(activeMaster.getZooKeeper(),
       rs.getServerName(), State.OPENING);
-    Region meta = rs.getFromOnlineRegions(HRegionInfo.FIRST_META_REGIONINFO.getEncodedName());
-    rs.removeFromOnlineRegions(meta, null);
+    Region meta = rs.getRegion(HRegionInfo.FIRST_META_REGIONINFO.getEncodedName());
+    rs.removeRegion(meta, null);
     ((HRegion)meta).close();
 
     log("Aborting master");

http://git-wip-us.apache.org/repos/asf/hbase/blob/bd68551f/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestRegionPlacement.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestRegionPlacement.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestRegionPlacement.java
index ccc5b17..b6f3869 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestRegionPlacement.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestRegionPlacement.java
@@ -417,7 +417,7 @@ public class TestRegionPlacement {
     MiniHBaseCluster cluster = TEST_UTIL.getHBaseCluster();
     for (int i = 0; i < SLAVES; i++) {
       HRegionServer rs = cluster.getRegionServer(i);
-      for (Region region: rs.getOnlineRegions(TableName.valueOf("testRegionAssignment"))) {
+      for (Region region: rs.getRegions(TableName.valueOf("testRegionAssignment"))) {
         InetSocketAddress[] favoredSocketAddress = rs.getFavoredNodesForRegion(
             region.getRegionInfo().getEncodedName());
         List<ServerName> favoredServerList = plan.getAssignmentMap().get(region.getRegionInfo());

http://git-wip-us.apache.org/repos/asf/hbase/blob/bd68551f/hbase-server/src/test/java/org/apache/hadoop/hbase/master/balancer/TestFavoredStochasticLoadBalancer.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/balancer/TestFavoredStochasticLoadBalancer.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/master/balancer/TestFavoredStochasticLoadBalancer.java
index 991cf72..4cf3fb6 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/balancer/TestFavoredStochasticLoadBalancer.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/master/balancer/TestFavoredStochasticLoadBalancer.java
@@ -544,7 +544,7 @@ public class TestFavoredStochasticLoadBalancer extends BalancerTestBase {
 
   private void compactTable(TableName tableName) throws IOException {
     for(JVMClusterUtil.RegionServerThread t : cluster.getRegionServerThreads()) {
-      for(Region region : t.getRegionServer().getOnlineRegions(tableName)) {
+      for(Region region : t.getRegionServer().getRegions(tableName)) {
         region.compact(true);
       }
     }

http://git-wip-us.apache.org/repos/asf/hbase/blob/bd68551f/hbase-server/src/test/java/org/apache/hadoop/hbase/master/balancer/TestRegionLocationFinder.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/balancer/TestRegionLocationFinder.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/master/balancer/TestRegionLocationFinder.java
index 365059c..b96dcb5 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/balancer/TestRegionLocationFinder.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/master/balancer/TestRegionLocationFinder.java
@@ -62,7 +62,7 @@ public class TestRegionLocationFinder {
 
     for (int i = 0; i < ServerNum; i++) {
       HRegionServer server = cluster.getRegionServer(i);
-      for (Region region : server.getOnlineRegions(tableName)) {
+      for (Region region : server.getRegions(tableName)) {
         region.flush(true);
       }
     }
@@ -83,7 +83,7 @@ public class TestRegionLocationFinder {
   public void testInternalGetTopBlockLocation() throws Exception {
     for (int i = 0; i < ServerNum; i++) {
       HRegionServer server = cluster.getRegionServer(i);
-      for (Region region : server.getOnlineRegions(tableName)) {
+      for (Region region : server.getRegions(tableName)) {
         // get region's hdfs block distribution by region and RegionLocationFinder, 
         // they should have same result
         HDFSBlocksDistribution blocksDistribution1 = region.getHDFSBlocksDistribution();
@@ -122,7 +122,7 @@ public class TestRegionLocationFinder {
   public void testGetTopBlockLocations() throws Exception {
     for (int i = 0; i < ServerNum; i++) {
       HRegionServer server = cluster.getRegionServer(i);
-      for (Region region : server.getOnlineRegions(tableName)) {
+      for (Region region : server.getRegions(tableName)) {
         List<ServerName> servers = finder.getTopBlockLocations(region
             .getRegionInfo());
         // test table may have empty region
@@ -147,7 +147,7 @@ public class TestRegionLocationFinder {
     finder.getCache().invalidateAll();
     for (int i = 0; i < ServerNum; i++) {
       HRegionServer server = cluster.getRegionServer(i);
-      List<Region> regions = server.getOnlineRegions(tableName);
+      List<Region> regions = server.getRegions(tableName);
       if (regions.size() <= 0) {
         continue;
       }

http://git-wip-us.apache.org/repos/asf/hbase/blob/bd68551f/hbase-server/src/test/java/org/apache/hadoop/hbase/master/balancer/TestRegionsOnMasterOptions.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/balancer/TestRegionsOnMasterOptions.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/master/balancer/TestRegionsOnMasterOptions.java
index d590db5..61ac2fa 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/balancer/TestRegionsOnMasterOptions.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/master/balancer/TestRegionsOnMasterOptions.java
@@ -150,7 +150,7 @@ public class TestRegionsOnMasterOptions {
     try {
       Table t = TEST_UTIL.createMultiRegionTable(tn, HConstants.CATALOG_FAMILY, REGIONS);
       LOG.info("Server: " + cluster.getMaster().getServerManager().getOnlineServersList());
-      List<Region> regions = cluster.getMaster().getOnlineRegions();
+      List<Region> regions = cluster.getMaster().getRegions();
       int mActualCount = regions.size();
       if (masterCount == 0 || masterCount == SYSTEM_REGIONS) {
         // 0 means no regions on master.
@@ -163,7 +163,7 @@ public class TestRegionsOnMasterOptions {
       // thread though it is a regionserver so we have to check master and then below the
       // regionservers.
       for (JVMClusterUtil.RegionServerThread rst: cluster.getRegionServerThreads()) {
-        regions = rst.getRegionServer().getOnlineRegions();
+        regions = rst.getRegionServer().getRegions();
         int rsActualCount = regions.size();
         checkCount(rsActualCount, rsCount);
       }
@@ -179,7 +179,7 @@ public class TestRegionsOnMasterOptions {
       }
       LOG.info("Cluster is up; running balancer");
       cluster.getMaster().balance();
-      regions = cluster.getMaster().getOnlineRegions();
+      regions = cluster.getMaster().getRegions();
       int mNewActualCount = regions.size();
       if (masterCount == 0 || masterCount == SYSTEM_REGIONS) {
         // 0 means no regions on master. After crash, should still be no regions on master.

http://git-wip-us.apache.org/repos/asf/hbase/blob/bd68551f/hbase-server/src/test/java/org/apache/hadoop/hbase/master/cleaner/TestSnapshotFromMaster.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/cleaner/TestSnapshotFromMaster.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/master/cleaner/TestSnapshotFromMaster.java
index 5179404..756152e 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/cleaner/TestSnapshotFromMaster.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/master/cleaner/TestSnapshotFromMaster.java
@@ -328,7 +328,7 @@ public class TestSnapshotFromMaster {
         .getRegionServerThreads();
     HRegionServer hrs = null;
     for (RegionServerThread rs : regionServerThreads) {
-      if (!rs.getRegionServer().getOnlineRegions(TABLE_NAME).isEmpty()) {
+      if (!rs.getRegionServer().getRegions(TABLE_NAME).isEmpty()) {
         hrs = rs.getRegionServer();
         break;
       }

http://git-wip-us.apache.org/repos/asf/hbase/blob/bd68551f/hbase-server/src/test/java/org/apache/hadoop/hbase/quotas/TestFileSystemUtilizationChore.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/quotas/TestFileSystemUtilizationChore.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/quotas/TestFileSystemUtilizationChore.java
index 0d07e1a..60f2467 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/quotas/TestFileSystemUtilizationChore.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/quotas/TestFileSystemUtilizationChore.java
@@ -64,7 +64,7 @@ public class TestFileSystemUtilizationChore {
         .reportRegionSizesForQuotas((Map<HRegionInfo,Long>) any(Map.class));
 
     final Region region = mockRegionWithSize(regionSizes);
-    when(rs.getOnlineRegions()).thenReturn(Arrays.asList(region));
+    when(rs.getRegions()).thenReturn(Arrays.asList(region));
     chore.chore();
   }
 
@@ -81,7 +81,7 @@ public class TestFileSystemUtilizationChore {
         .reportRegionSizesForQuotas((Map<HRegionInfo,Long>) any(Map.class));
 
     final Region region = mockRegionWithSize(regionSizes);
-    when(rs.getOnlineRegions()).thenReturn(Arrays.asList(region));
+    when(rs.getRegions()).thenReturn(Arrays.asList(region));
     chore.chore();
   }
 
@@ -107,7 +107,7 @@ public class TestFileSystemUtilizationChore {
     final Region r1 = mockRegionWithSize(r1Sizes);
     final Region r2 = mockRegionWithSize(r2Sizes);
     final Region r3 = mockRegionWithSize(r3Sizes);
-    when(rs.getOnlineRegions()).thenReturn(Arrays.asList(r1, r2, r3));
+    when(rs.getRegions()).thenReturn(Arrays.asList(r1, r2, r3));
     chore.chore();
   }
 
@@ -173,7 +173,7 @@ public class TestFileSystemUtilizationChore {
     final Region r1 = mockRegionWithSize(Arrays.asList(1024L, 2048L));
     final Region r2 = mockRegionWithSize(Arrays.asList(1024L * 1024L));
     final Region r3 = mockRegionWithSize(Arrays.asList(10L * 1024L * 1024L));
-    when(rs.getOnlineRegions()).thenReturn(Arrays.asList(r1, r2, r3, lr1, lr2));
+    when(rs.getRegions()).thenReturn(Arrays.asList(r1, r2, r3, lr1, lr2));
 
     chore.chore();
   }
@@ -206,7 +206,7 @@ public class TestFileSystemUtilizationChore {
     final Region r2 = mockRegionWithSize(Arrays.asList(1024L * 1024L));
     final Region r3 = mockRegionWithSize(Arrays.asList(10L * 1024L * 1024L));
     // lr2 is no longer online, so it should be ignored
-    when(rs.getOnlineRegions()).thenReturn(Arrays.asList(r1, r2, r3, lr1));
+    when(rs.getRegions()).thenReturn(Arrays.asList(r1, r2, r3, lr1));
 
     chore.chore();
   }
@@ -229,7 +229,7 @@ public class TestFileSystemUtilizationChore {
 
     final Region r1 = mockRegionWithSize(r1Sizes);
     final Region r2 = mockSplitParentRegionWithSize(r2Sizes);
-    when(rs.getOnlineRegions()).thenReturn(Arrays.asList(r1, r2));
+    when(rs.getRegions()).thenReturn(Arrays.asList(r1, r2));
     chore.chore();
   }
 
@@ -251,7 +251,7 @@ public class TestFileSystemUtilizationChore {
 
     final Region r1 = mockRegionWithSize(r1Sizes);
     final Region r2 = mockRegionReplicaWithSize(r2Sizes);
-    when(rs.getOnlineRegions()).thenReturn(Arrays.asList(r1, r2));
+    when(rs.getRegions()).thenReturn(Arrays.asList(r1, r2));
     chore.chore();
   }
 
@@ -278,7 +278,7 @@ public class TestFileSystemUtilizationChore {
 
     final Region r1 = mockRegionWithHFileLinks(r1StoreFileSizes, r1HFileSizes);
     final Region r2 = mockRegionWithHFileLinks(r2StoreFileSizes, r2HFileSizes);
-    when(rs.getOnlineRegions()).thenReturn(Arrays.asList(r1, r2));
+    when(rs.getRegions()).thenReturn(Arrays.asList(r1, r2));
     chore.chore();
   }
 

http://git-wip-us.apache.org/repos/asf/hbase/blob/bd68551f/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestCompactionArchiveConcurrentClose.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestCompactionArchiveConcurrentClose.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestCompactionArchiveConcurrentClose.java
index 2a2602c..d54b58d 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestCompactionArchiveConcurrentClose.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestCompactionArchiveConcurrentClose.java
@@ -92,7 +92,7 @@ public class TestCompactionArchiveConcurrentClose {
     RegionServerServices rss = mock(RegionServerServices.class);
     List<Region> regions = new ArrayList<>();
     regions.add(region);
-    when(rss.getOnlineRegions()).thenReturn(regions);
+    when(rss.getRegions()).thenReturn(regions);
 
     // Create the cleaner object
     CompactedHFilesDischarger cleaner =

http://git-wip-us.apache.org/repos/asf/hbase/blob/bd68551f/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestCompactionArchiveIOException.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestCompactionArchiveIOException.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestCompactionArchiveIOException.java
index 1d976e9..8afe85e 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestCompactionArchiveIOException.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestCompactionArchiveIOException.java
@@ -101,7 +101,7 @@ public class TestCompactionArchiveIOException {
     RegionServerServices rss = mock(RegionServerServices.class);
     List<Region> regions = new ArrayList<>();
     regions.add(region);
-    when(rss.getOnlineRegions()).thenReturn(regions);
+    when(rss.getRegions()).thenReturn(regions);
 
     // Create the cleaner object
     final CompactedHFilesDischarger cleaner =

http://git-wip-us.apache.org/repos/asf/hbase/blob/bd68551f/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestCompactionFileNotFound.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestCompactionFileNotFound.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestCompactionFileNotFound.java
index a7d866b..a3184b4 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestCompactionFileNotFound.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestCompactionFileNotFound.java
@@ -133,7 +133,7 @@ public class TestCompactionFileNotFound {
           int numRegionsAfterSplit = 0;
           List<RegionServerThread> rst = util.getMiniHBaseCluster().getLiveRegionServerThreads();
           for (RegionServerThread t : rst) {
-            numRegionsAfterSplit += t.getRegionServer().getOnlineRegions(TEST_TABLE).size();
+            numRegionsAfterSplit += t.getRegionServer().getRegions(TEST_TABLE).size();
           }
           // Make sure that the split went through and all the regions are assigned
           return (numRegionsAfterSplit == numRegionsBeforeSplit + 1

http://git-wip-us.apache.org/repos/asf/hbase/blob/bd68551f/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestCompactionInDeadRegionServer.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestCompactionInDeadRegionServer.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestCompactionInDeadRegionServer.java
index ae81a4b..4b13c30 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestCompactionInDeadRegionServer.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestCompactionInDeadRegionServer.java
@@ -125,7 +125,7 @@ public class TestCompactionInDeadRegionServer {
   @Test
   public void test() throws Exception {
     HRegionServer rsToSuspend = UTIL.getRSForFirstRegionInTable(TABLE_NAME);
-    HRegion region = (HRegion) rsToSuspend.getOnlineRegions(TABLE_NAME).get(0);
+    HRegion region = (HRegion) rsToSuspend.getRegions(TABLE_NAME).get(0);
     ZooKeeperWatcher watcher = UTIL.getZooKeeperWatcher();
     watcher.getRecoverableZooKeeper().delete(
       ZKUtil.joinZNode(watcher.getZNodePaths().rsZNode, rsToSuspend.getServerName().toString()),
@@ -137,7 +137,7 @@ public class TestCompactionInDeadRegionServer {
         for (RegionServerThread thread : UTIL.getHBaseCluster().getRegionServerThreads()) {
           HRegionServer rs = thread.getRegionServer();
           if (rs != rsToSuspend) {
-            return !rs.getOnlineRegions(TABLE_NAME).isEmpty();
+            return !rs.getRegions(TABLE_NAME).isEmpty();
           }
         }
         return false;

http://git-wip-us.apache.org/repos/asf/hbase/blob/bd68551f/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestCompactionState.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestCompactionState.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestCompactionState.java
index 8c55327..ac52ea4 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestCompactionState.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestCompactionState.java
@@ -138,7 +138,7 @@ public class TestCompactionState {
       ht = TEST_UTIL.createTable(table, families);
       loadData(ht, families, 3000, flushes);
       HRegionServer rs = TEST_UTIL.getMiniHBaseCluster().getRegionServer(0);
-      List<Region> regions = rs.getOnlineRegions(table);
+      List<Region> regions = rs.getRegions(table);
       int countBefore = countStoreFilesInFamilies(regions, families);
       int countBeforeSingleFamily = countStoreFilesInFamily(regions, family);
       assertTrue(countBefore > 0); // there should be some data files

http://git-wip-us.apache.org/repos/asf/hbase/blob/bd68551f/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestEncryptionKeyRotation.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestEncryptionKeyRotation.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestEncryptionKeyRotation.java
index f58d19a..b2ef2f7 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestEncryptionKeyRotation.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestEncryptionKeyRotation.java
@@ -209,7 +209,7 @@ public class TestEncryptionKeyRotation {
       throws IOException, InterruptedException {
     boolean compacted = false;
     for (Region region : TEST_UTIL.getRSForFirstRegionInTable(tableName)
-        .getOnlineRegions(tableName)) {
+        .getRegions(tableName)) {
       for (HStore store : ((HRegion) region).getStores()) {
         compacted = false;
         while (!compacted) {
@@ -235,7 +235,7 @@ public class TestEncryptionKeyRotation {
   private static List<Path> findStorefilePaths(TableName tableName) throws Exception {
     List<Path> paths = new ArrayList<>();
     for (Region region : TEST_UTIL.getRSForFirstRegionInTable(tableName)
-        .getOnlineRegions(tableName)) {
+        .getRegions(tableName)) {
       for (HStore store : ((HRegion) region).getStores()) {
         for (HStoreFile storefile : store.getStorefiles()) {
           paths.add(storefile.getPath());
@@ -248,7 +248,7 @@ public class TestEncryptionKeyRotation {
   private static List<Path> findCompactedStorefilePaths(TableName tableName) throws Exception {
     List<Path> paths = new ArrayList<>();
     for (Region region : TEST_UTIL.getRSForFirstRegionInTable(tableName)
-        .getOnlineRegions(tableName)) {
+        .getRegions(tableName)) {
       for (HStore store : ((HRegion) region).getStores()) {
         Collection<HStoreFile> compactedfiles =
             store.getStoreEngine().getStoreFileManager().getCompactedfiles();

http://git-wip-us.apache.org/repos/asf/hbase/blob/bd68551f/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestEncryptionRandomKeying.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestEncryptionRandomKeying.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestEncryptionRandomKeying.java
index 75c752c..42ef533 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestEncryptionRandomKeying.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestEncryptionRandomKeying.java
@@ -54,7 +54,7 @@ public class TestEncryptionRandomKeying {
   private static List<Path> findStorefilePaths(TableName tableName) throws Exception {
     List<Path> paths = new ArrayList<>();
     for (Region region:
-        TEST_UTIL.getRSForFirstRegionInTable(tableName).getOnlineRegions(htd.getTableName())) {
+        TEST_UTIL.getRSForFirstRegionInTable(tableName).getRegions(htd.getTableName())) {
       for (HStore store : ((HRegion) region).getStores()) {
         for (HStoreFile storefile : store.getStorefiles()) {
           paths.add(storefile.getPath());

http://git-wip-us.apache.org/repos/asf/hbase/blob/bd68551f/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestHRegionReplayEvents.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestHRegionReplayEvents.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestHRegionReplayEvents.java
index ab98ec9..f13c509 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestHRegionReplayEvents.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestHRegionReplayEvents.java
@@ -181,7 +181,7 @@ public class TestHRegionReplayEvents {
     primaryRegion.close();
     List<Region> regions = new ArrayList<>();
     regions.add(primaryRegion);
-    when(rss.getOnlineRegions()).thenReturn(regions);
+    when(rss.getRegions()).thenReturn(regions);
 
     primaryRegion = HRegion.openHRegion(rootDir, primaryHri, htd, walPrimary, CONF, rss, null);
     secondaryRegion = HRegion.openHRegion(secondaryHri, htd, null, CONF, rss, null);
@@ -1394,7 +1394,7 @@ public class TestHRegionReplayEvents {
     primaryRegion.compactStores();
     List<Region> regions = new ArrayList<>();
     regions.add(primaryRegion);
-    when(rss.getOnlineRegions()).thenReturn(regions);
+    when(rss.getRegions()).thenReturn(regions);
     CompactedHFilesDischarger cleaner = new CompactedHFilesDischarger(100, null, rss, false);
     cleaner.chore();
     secondaryRegion.refreshStoreFiles();

http://git-wip-us.apache.org/repos/asf/hbase/blob/bd68551f/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestPerColumnFamilyFlush.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestPerColumnFamilyFlush.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestPerColumnFamilyFlush.java
index a8b84eb..8d4a36e 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestPerColumnFamilyFlush.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestPerColumnFamilyFlush.java
@@ -330,7 +330,7 @@ public class TestPerColumnFamilyFlush {
     List<JVMClusterUtil.RegionServerThread> rsts = cluster.getRegionServerThreads();
     for (int i = 0; i < cluster.getRegionServerThreads().size(); i++) {
       HRegionServer hrs = rsts.get(i).getRegionServer();
-      for (Region region : hrs.getOnlineRegions(tableName)) {
+      for (Region region : hrs.getRegions(tableName)) {
         return Pair.newPair(region, hrs);
       }
     }

http://git-wip-us.apache.org/repos/asf/hbase/blob/bd68551f/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestRegionFavoredNodes.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestRegionFavoredNodes.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestRegionFavoredNodes.java
index d8f75ed..b2b03ff 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestRegionFavoredNodes.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestRegionFavoredNodes.java
@@ -114,7 +114,7 @@ public class TestRegionFavoredNodes {
     // them as favored nodes through the region.
     for (int i = 0; i < REGION_SERVERS; i++) {
       HRegionServer server = TEST_UTIL.getHBaseCluster().getRegionServer(i);
-      List<Region> regions = server.getOnlineRegions(TABLE_NAME);
+      List<Region> regions = server.getRegions(TABLE_NAME);
       for (Region region : regions) {
         List<org.apache.hadoop.hbase.shaded.protobuf.generated.HBaseProtos.ServerName>favoredNodes =
             new ArrayList<>(3);
@@ -142,7 +142,7 @@ public class TestRegionFavoredNodes {
     // they are consistent with the favored nodes for that region.
     for (int i = 0; i < REGION_SERVERS; i++) {
       HRegionServer server = TEST_UTIL.getHBaseCluster().getRegionServer(i);
-      List<Region> regions = server.getOnlineRegions(TABLE_NAME);
+      List<Region> regions = server.getRegions(TABLE_NAME);
       for (Region region : regions) {
         List<String> files = region.getStoreFileList(new byte[][]{COLUMN_FAMILY});
         for (String file : files) {

http://git-wip-us.apache.org/repos/asf/hbase/blob/bd68551f/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestRegionReplicaFailover.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestRegionReplicaFailover.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestRegionReplicaFailover.java
index 69b7581..ffcc5c0 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestRegionReplicaFailover.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestRegionReplicaFailover.java
@@ -185,7 +185,7 @@ public class TestRegionReplicaFailover {
       // read from it the same data from primary and secondaries
       boolean aborted = false;
       for (RegionServerThread rs : HTU.getMiniHBaseCluster().getRegionServerThreads()) {
-        for (Region r : rs.getRegionServer().getOnlineRegions(htd.getTableName())) {
+        for (Region r : rs.getRegionServer().getRegions(htd.getTableName())) {
           if (r.getRegionInfo().getReplicaId() == 0) {
             LOG.info("Aborting region server hosting primary region replica");
             rs.getRegionServer().abort("for test");
@@ -247,7 +247,7 @@ public class TestRegionReplicaFailover {
       // read from it the same data
       boolean aborted = false;
       for (RegionServerThread rs : HTU.getMiniHBaseCluster().getRegionServerThreads()) {
-        for (Region r : rs.getRegionServer().getOnlineRegions(htd.getTableName())) {
+        for (Region r : rs.getRegionServer().getRegions(htd.getTableName())) {
           if (r.getRegionInfo().getReplicaId() == 1) {
             LOG.info("Aborting region server hosting secondary region replica");
             rs.getRegionServer().abort("for test");
@@ -308,7 +308,7 @@ public class TestRegionReplicaFailover {
           try {
             boolean aborted = false;
             for (RegionServerThread rs : HTU.getMiniHBaseCluster().getRegionServerThreads()) {
-              for (Region r : rs.getRegionServer().getOnlineRegions(htd.getTableName())) {
+              for (Region r : rs.getRegionServer().getRegions(htd.getTableName())) {
                 if (r.getRegionInfo().getReplicaId() == 1) {
                   LOG.info("Aborting region server hosting secondary region replica");
                   rs.getRegionServer().abort("for test");

http://git-wip-us.apache.org/repos/asf/hbase/blob/bd68551f/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestRegionReplicas.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestRegionReplicas.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestRegionReplicas.java
index 86fe5af..5d2b9c1 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestRegionReplicas.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestRegionReplicas.java
@@ -162,7 +162,7 @@ public class TestRegionReplicas {
       openRegion(HTU, getRS(), hriSecondary);
 
       // first try directly against region
-      region = getRS().getFromOnlineRegions(hriSecondary.getEncodedName());
+      region = getRS().getRegion(hriSecondary.getEncodedName());
       assertGet(region, 42, true);
 
       assertGetRpc(hriSecondary, 42, true);
@@ -259,7 +259,7 @@ public class TestRegionReplicas {
       Threads.sleep(4 * refreshPeriod);
 
       LOG.info("Checking results from secondary region replica");
-      Region secondaryRegion = getRS().getFromOnlineRegions(hriSecondary.getEncodedName());
+      Region secondaryRegion = getRS().getRegion(hriSecondary.getEncodedName());
       Assert.assertEquals(1, secondaryRegion.getStore(f).getStorefilesCount());
 
       assertGet(secondaryRegion, 42, true);
@@ -446,11 +446,11 @@ public class TestRegionReplicas {
         region.flush(true);
       }
 
-      Region primaryRegion = getRS().getFromOnlineRegions(hriPrimary.getEncodedName());
+      Region primaryRegion = getRS().getRegion(hriPrimary.getEncodedName());
       Assert.assertEquals(3, primaryRegion.getStore(f).getStorefilesCount());
 
       // Refresh store files on the secondary
-      Region secondaryRegion = getRS().getFromOnlineRegions(hriSecondary.getEncodedName());
+      Region secondaryRegion = getRS().getRegion(hriSecondary.getEncodedName());
       secondaryRegion.getStore(f).refreshStoreFiles();
       Assert.assertEquals(3, secondaryRegion.getStore(f).getStorefilesCount());
 

http://git-wip-us.apache.org/repos/asf/hbase/blob/bd68551f/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestRegionServerAbort.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestRegionServerAbort.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestRegionServerAbort.java
index 8b4afac..9928a77 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestRegionServerAbort.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestRegionServerAbort.java
@@ -168,7 +168,7 @@ public class TestRegionServerAbort {
     public void prePut(ObserverContext<RegionCoprocessorEnvironment> c, Put put, WALEdit edit,
                        Durability durability) throws IOException {
       if (put.getAttribute(DO_ABORT) != null) {
-        HRegionServer rs = (HRegionServer) c.getEnvironment().getRegionServerServices();
+        HRegionServer rs = (HRegionServer) c.getEnvironment().getCoprocessorRegionServerServices();
         LOG.info("Triggering abort for regionserver " + rs.getServerName());
         rs.abort("Aborting for test");
       }

http://git-wip-us.apache.org/repos/asf/hbase/blob/bd68551f/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestRegionServerMetrics.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestRegionServerMetrics.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestRegionServerMetrics.java
index 437caac..6d8744b 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestRegionServerMetrics.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestRegionServerMetrics.java
@@ -496,7 +496,7 @@ public class TestRegionServerMetrics {
     byte[] val = Bytes.toBytes("mobdata");
     try {
       Table table = TEST_UTIL.createTable(htd, new byte[0][0], conf);
-      Region region = rs.getOnlineRegions(tableName).get(0);
+      Region region = rs.getRegions(tableName).get(0);
       for (int insertCount = 0; insertCount < numHfiles; insertCount++) {
         Put p = new Put(Bytes.toBytes(insertCount));
         p.addColumn(cf, qualifier, val);

http://git-wip-us.apache.org/repos/asf/hbase/blob/bd68551f/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestRegionSplitPolicy.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestRegionSplitPolicy.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestRegionSplitPolicy.java
index 06c0bfd..8d0a822 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestRegionSplitPolicy.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestRegionSplitPolicy.java
@@ -105,7 +105,7 @@ public class TestRegionSplitPolicy {
     // return 'online regions'.
     RegionServerServices rss = Mockito.mock(RegionServerServices.class);
     final List<Region> regions = new ArrayList<>();
-    Mockito.when(rss.getOnlineRegions(TABLENAME)).thenReturn(regions);
+    Mockito.when(rss.getRegions(TABLENAME)).thenReturn(regions);
     Mockito.when(mockRegion.getRegionServerServices()).thenReturn(rss);
     // Set max size for this 'table'.
     long maxSplitSize = 1024L;
@@ -164,7 +164,7 @@ public class TestRegionSplitPolicy {
 
     RegionServerServices rss  = Mockito.mock(RegionServerServices.class);
     final List<Region> regions = new ArrayList<>();
-    Mockito.when(rss.getOnlineRegions(TABLENAME)).thenReturn(regions);
+    Mockito.when(rss.getRegions(TABLENAME)).thenReturn(regions);
     Mockito.when(mockRegion.getRegionServerServices()).thenReturn(rss);
     Mockito.when(mockRegion.getBlockedRequestsCount()).thenReturn(0L);
     Mockito.when(mockRegion.getWriteRequestsCount()).thenReturn(0L);

http://git-wip-us.apache.org/repos/asf/hbase/blob/bd68551f/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestSplitWalDataLoss.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestSplitWalDataLoss.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestSplitWalDataLoss.java
index 78c5330..fecfd94 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestSplitWalDataLoss.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestSplitWalDataLoss.java
@@ -95,7 +95,7 @@ public class TestSplitWalDataLoss {
   @Test
   public void test() throws IOException, InterruptedException {
     final HRegionServer rs = testUtil.getRSForFirstRegionInTable(tableName);
-    final HRegion region = (HRegion) rs.getOnlineRegions(tableName).get(0);
+    final HRegion region = (HRegion) rs.getRegions(tableName).get(0);
     HRegion spiedRegion = spy(region);
     final MutableBoolean flushed = new MutableBoolean(false);
     final MutableBoolean reported = new MutableBoolean(false);

http://git-wip-us.apache.org/repos/asf/hbase/blob/bd68551f/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/compactions/TestCompactedHFilesDischarger.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/compactions/TestCompactedHFilesDischarger.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/compactions/TestCompactedHFilesDischarger.java
index e30383e..5afa52f 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/compactions/TestCompactedHFilesDischarger.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/compactions/TestCompactedHFilesDischarger.java
@@ -78,7 +78,7 @@ public class TestCompactedHFilesDischarger {
     rss = mock(RegionServerServices.class);
     List<Region> regions = new ArrayList<>(1);
     regions.add(region);
-    when(rss.getOnlineRegions()).thenReturn(regions);
+    when(rss.getRegions()).thenReturn(regions);
   }
 
   @After

http://git-wip-us.apache.org/repos/asf/hbase/blob/bd68551f/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/compactions/TestFIFOCompactionPolicy.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/compactions/TestFIFOCompactionPolicy.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/compactions/TestFIFOCompactionPolicy.java
index 74b915e..803ef11 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/compactions/TestFIFOCompactionPolicy.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/compactions/TestFIFOCompactionPolicy.java
@@ -70,7 +70,7 @@ public class TestFIFOCompactionPolicy {
     List<JVMClusterUtil.RegionServerThread> rsts = cluster.getRegionServerThreads();
     for (int i = 0; i < cluster.getRegionServerThreads().size(); i++) {
       HRegionServer hrs = rsts.get(i).getRegionServer();
-      for (Region region : hrs.getOnlineRegions(tableName)) {
+      for (Region region : hrs.getRegions(tableName)) {
         return region.getStores().iterator().next();
       }
     }

http://git-wip-us.apache.org/repos/asf/hbase/blob/bd68551f/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/throttle/TestCompactionWithThroughputController.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/throttle/TestCompactionWithThroughputController.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/throttle/TestCompactionWithThroughputController.java
index 5a2ac6f..16fb813 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/throttle/TestCompactionWithThroughputController.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/throttle/TestCompactionWithThroughputController.java
@@ -76,7 +76,7 @@ public class TestCompactionWithThroughputController {
     List<JVMClusterUtil.RegionServerThread> rsts = cluster.getRegionServerThreads();
     for (int i = 0; i < cluster.getRegionServerThreads().size(); i++) {
       HRegionServer hrs = rsts.get(i).getRegionServer();
-      for (Region region : hrs.getOnlineRegions(tableName)) {
+      for (Region region : hrs.getRegions(tableName)) {
         return region.getStores().iterator().next();
       }
     }

http://git-wip-us.apache.org/repos/asf/hbase/blob/bd68551f/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/throttle/TestFlushWithThroughputController.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/throttle/TestFlushWithThroughputController.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/throttle/TestFlushWithThroughputController.java
index d790eff..c5a595c 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/throttle/TestFlushWithThroughputController.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/throttle/TestFlushWithThroughputController.java
@@ -78,7 +78,7 @@ public class TestFlushWithThroughputController {
     List<JVMClusterUtil.RegionServerThread> rsts = cluster.getRegionServerThreads();
     for (int i = 0; i < cluster.getRegionServerThreads().size(); i++) {
       HRegionServer hrs = rsts.get(i).getRegionServer();
-      for (Region region : hrs.getOnlineRegions(tableName)) {
+      for (Region region : hrs.getRegions(tableName)) {
         return region.getStores().iterator().next();
       }
     }
@@ -165,7 +165,7 @@ public class TestFlushWithThroughputController {
     HRegionServer regionServer = hbtu.getRSForFirstRegionInTable(tableName);
     PressureAwareFlushThroughputController throughputController =
         (PressureAwareFlushThroughputController) regionServer.getFlushThroughputController();
-    for (Region region : regionServer.getOnlineRegions()) {
+    for (Region region : regionServer.getRegions()) {
       region.flush(true);
     }
     assertEquals(0.0, regionServer.getFlushPressure(), EPSILON);

http://git-wip-us.apache.org/repos/asf/hbase/blob/bd68551f/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/wal/AbstractTestLogRolling.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/wal/AbstractTestLogRolling.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/wal/AbstractTestLogRolling.java
index a11540c..4c3d2a5 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/wal/AbstractTestLogRolling.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/wal/AbstractTestLogRolling.java
@@ -189,7 +189,7 @@ public abstract class AbstractTestLogRolling  {
     this.tableName = getName();
     // TODO: Why does this write data take for ever?
     startAndWriteData();
-    HRegionInfo region = server.getOnlineRegions(TableName.valueOf(tableName)).get(0)
+    HRegionInfo region = server.getRegions(TableName.valueOf(tableName)).get(0)
         .getRegionInfo();
     final WAL log = server.getWAL(region);
     LOG.info("after writing there are " + AbstractFSWALProvider.getNumRolledLogFiles(log) + " log files");
@@ -249,7 +249,7 @@ public abstract class AbstractTestLogRolling  {
       table = createTestTable(getName());
 
       server = TEST_UTIL.getRSForFirstRegionInTable(table.getName());
-      Region region = server.getOnlineRegions(table.getName()).get(0);
+      Region region = server.getRegions(table.getName()).get(0);
       final WAL log = server.getWAL(region.getRegionInfo());
       Store s = region.getStore(HConstants.CATALOG_FAMILY);
 

http://git-wip-us.apache.org/repos/asf/hbase/blob/bd68551f/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/wal/TestAsyncLogRolling.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/wal/TestAsyncLogRolling.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/wal/TestAsyncLogRolling.java
index c138747..bba08a7 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/wal/TestAsyncLogRolling.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/wal/TestAsyncLogRolling.java
@@ -58,7 +58,7 @@ public class TestAsyncLogRolling extends AbstractTestLogRolling {
     TEST_UTIL.waitUntilAllRegionsAssigned(table.getName());
     doPut(table, 1);
     server = TEST_UTIL.getRSForFirstRegionInTable(table.getName());
-    HRegionInfo hri = server.getOnlineRegions(table.getName()).get(0).getRegionInfo();
+    HRegionInfo hri = server.getRegions(table.getName()).get(0).getRegionInfo();
     AsyncFSWAL wal = (AsyncFSWAL) server.getWAL(hri);
     int numRolledLogFiles = AsyncFSWALProvider.getNumRolledLogFiles(wal);
     DatanodeInfo[] dnInfos = wal.getPipeline();

http://git-wip-us.apache.org/repos/asf/hbase/blob/bd68551f/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/wal/TestLogRolling.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/wal/TestLogRolling.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/wal/TestLogRolling.java
index 9ccfeef..de6fdb3 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/wal/TestLogRolling.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/wal/TestLogRolling.java
@@ -140,7 +140,7 @@ public class TestLogRolling extends AbstractTestLogRolling {
     Table table = TEST_UTIL.getConnection().getTable(desc.getTableName());
 
     server = TEST_UTIL.getRSForFirstRegionInTable(desc.getTableName());
-    HRegionInfo region = server.getOnlineRegions(desc.getTableName()).get(0).getRegionInfo();
+    HRegionInfo region = server.getRegions(desc.getTableName()).get(0).getRegionInfo();
     final FSHLog log = (FSHLog) server.getWAL(region);
     final AtomicBoolean lowReplicationHookCalled = new AtomicBoolean(false);
 
@@ -248,7 +248,7 @@ public class TestLogRolling extends AbstractTestLogRolling {
       Table table = TEST_UTIL.getConnection().getTable(desc.getTableName());
 
       server = TEST_UTIL.getRSForFirstRegionInTable(desc.getTableName());
-      HRegionInfo region = server.getOnlineRegions(desc.getTableName()).get(0).getRegionInfo();
+      HRegionInfo region = server.getRegions(desc.getTableName()).get(0).getRegionInfo();
       final WAL log = server.getWAL(region);
       final List<Path> paths = new ArrayList<>(1);
       final List<Integer> preLogRolledCalled = new ArrayList<>();

http://git-wip-us.apache.org/repos/asf/hbase/blob/bd68551f/hbase-server/src/test/java/org/apache/hadoop/hbase/replication/regionserver/TestRegionReplicaReplicationEndpoint.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/replication/regionserver/TestRegionReplicaReplicationEndpoint.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/replication/regionserver/TestRegionReplicaReplicationEndpoint.java
index 9a2eff1..8068130 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/replication/regionserver/TestRegionReplicaReplicationEndpoint.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/replication/regionserver/TestRegionReplicaReplicationEndpoint.java
@@ -247,7 +247,7 @@ public class TestRegionReplicaReplicationEndpoint {
 
     for (int i=0; i < NB_SERVERS; i++) {
       HRegionServer rs = HTU.getMiniHBaseCluster().getRegionServer(i);
-      List<Region> onlineRegions = rs.getOnlineRegions(tableName);
+      List<Region> onlineRegions = rs.getRegions(tableName);
       for (Region region : onlineRegions) {
         regions[region.getRegionInfo().getReplicaId()] = region;
       }

http://git-wip-us.apache.org/repos/asf/hbase/blob/bd68551f/hbase-server/src/test/java/org/apache/hadoop/hbase/replication/regionserver/TestRegionReplicaReplicationEndpointNoMaster.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/replication/regionserver/TestRegionReplicaReplicationEndpointNoMaster.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/replication/regionserver/TestRegionReplicaReplicationEndpointNoMaster.java
index cfb0ce0..ebe4bb1 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/replication/regionserver/TestRegionReplicaReplicationEndpointNoMaster.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/replication/regionserver/TestRegionReplicaReplicationEndpointNoMaster.java
@@ -176,7 +176,7 @@ public class TestRegionReplicaReplicationEndpointNoMaster {
     // replay the edits to the secondary using replay callable
     replicateUsingCallable(connection, entries);
 
-    Region region = rs0.getFromOnlineRegions(hriSecondary.getEncodedName());
+    Region region = rs0.getRegion(hriSecondary.getEncodedName());
     HTU.verifyNumericRows(region, f, 0, 1000);
 
     HTU.deleteNumericRows(table, f, 0, 1000);
@@ -216,7 +216,7 @@ public class TestRegionReplicaReplicationEndpointNoMaster {
     // replay the edits to the secondary using replay callable
     replicateUsingCallable(connection, entries);
 
-    Region region = rs0.getFromOnlineRegions(hriSecondary.getEncodedName());
+    Region region = rs0.getRegion(hriSecondary.getEncodedName());
     HTU.verifyNumericRows(region, f, 0, 1000);
 
     HTU.loadNumericRows(table, f, 1000, 2000); // load some more data to primary
@@ -228,7 +228,7 @@ public class TestRegionReplicaReplicationEndpointNoMaster {
     // replicate the new data
     replicateUsingCallable(connection, entries);
 
-    region = rs1.getFromOnlineRegions(hriSecondary.getEncodedName());
+    region = rs1.getRegion(hriSecondary.getEncodedName());
     // verify the new data. old data may or may not be there
     HTU.verifyNumericRows(region, f, 1000, 2000);
 
@@ -261,7 +261,7 @@ public class TestRegionReplicaReplicationEndpointNoMaster {
     replicator.replicate(new ReplicateContext().setEntries(Lists.newArrayList(entries))
         .setWalGroupId(fakeWalGroupId));
 
-    Region region = rs0.getFromOnlineRegions(hriSecondary.getEncodedName());
+    Region region = rs0.getRegion(hriSecondary.getEncodedName());
     HTU.verifyNumericRows(region, f, 0, 1000);
 
     HTU.deleteNumericRows(table, f, 0, 1000);

http://git-wip-us.apache.org/repos/asf/hbase/blob/bd68551f/hbase-server/src/test/java/org/apache/hadoop/hbase/security/access/TestAccessController.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/security/access/TestAccessController.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/security/access/TestAccessController.java
index 4fb26d6..d38c20d 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/security/access/TestAccessController.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/security/access/TestAccessController.java
@@ -2148,7 +2148,7 @@ public class TestAccessController extends SecureTestUtil {
 
       final int RETRIES_LIMIT = 10;
       int retries = 0;
-      while (newRs.getOnlineRegions(TEST_TABLE2).size() < 1 && retries < RETRIES_LIMIT) {
+      while (newRs.getRegions(TEST_TABLE2).size() < 1 && retries < RETRIES_LIMIT) {
         LOG.debug("Waiting for region to be opened. Already retried " + retries
             + " times.");
         try {
@@ -2609,7 +2609,7 @@ public class TestAccessController extends SecureTestUtil {
     for (JVMClusterUtil.RegionServerThread thread:
         TEST_UTIL.getMiniHBaseCluster().getRegionServerThreads()) {
       HRegionServer rs = thread.getRegionServer();
-      for (Region region: rs.getOnlineRegions(TEST_TABLE)) {
+      for (Region region: rs.getRegions(TEST_TABLE)) {
         region.getCoprocessorHost().load(PingCoprocessor.class,
           Coprocessor.PRIORITY_USER, conf);
       }

http://git-wip-us.apache.org/repos/asf/hbase/blob/bd68551f/hbase-server/src/test/java/org/apache/hadoop/hbase/security/token/TestTokenAuthentication.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/security/token/TestTokenAuthentication.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/security/token/TestTokenAuthentication.java
index 012236c..780a8e0 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/security/token/TestTokenAuthentication.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/security/token/TestTokenAuthentication.java
@@ -60,6 +60,7 @@ import org.apache.hadoop.hbase.ipc.ServerRpcController;
 import org.apache.hadoop.hbase.ipc.SimpleRpcServer;
 import org.apache.hadoop.hbase.metrics.MetricRegistry;
 import org.apache.hadoop.hbase.protobuf.generated.AuthenticationProtos;
+import org.apache.hadoop.hbase.regionserver.CoprocessorRegionServerServices;
 import org.apache.hadoop.hbase.regionserver.HRegion;
 import org.apache.hadoop.hbase.regionserver.RegionServerServices;
 import org.apache.hadoop.hbase.security.SecurityInfo;
@@ -265,7 +266,7 @@ public class TestTokenAuthentication {
         public HRegion getRegion() { return null; }
 
         @Override
-        public RegionServerServices getRegionServerServices() {
+        public CoprocessorRegionServerServices getCoprocessorRegionServerServices() {
           return mockServices;
         }
 

http://git-wip-us.apache.org/repos/asf/hbase/blob/bd68551f/hbase-server/src/test/java/org/apache/hadoop/hbase/security/visibility/TestVisibilityLabels.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/security/visibility/TestVisibilityLabels.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/security/visibility/TestVisibilityLabels.java
index 9dc13d9..29bce1a 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/security/visibility/TestVisibilityLabels.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/security/visibility/TestVisibilityLabels.java
@@ -307,7 +307,7 @@ public abstract class TestVisibilityLabels {
         List<RegionServerThread> regionServerThreads = TEST_UTIL.getHBaseCluster()
             .getRegionServerThreads();
         for (RegionServerThread rsThread : regionServerThreads) {
-          List<Region> onlineRegions = rsThread.getRegionServer().getOnlineRegions(
+          List<Region> onlineRegions = rsThread.getRegionServer().getRegions(
               LABELS_TABLE_NAME);
           if (onlineRegions.size() > 0) {
             rsThread.getRegionServer().abort("Aborting ");
@@ -341,7 +341,7 @@ public abstract class TestVisibilityLabels {
     for (RegionServerThread rsThread : regionServerThreads) {
       while (true) {
         if (!rsThread.getRegionServer().isAborted()) {
-          List<Region> onlineRegions = rsThread.getRegionServer().getOnlineRegions(
+          List<Region> onlineRegions = rsThread.getRegionServer().getRegions(
               LABELS_TABLE_NAME);
           if (onlineRegions.size() > 0) {
             break;
@@ -392,13 +392,13 @@ public abstract class TestVisibilityLabels {
       } catch (InterruptedException e) {
       }
     }
-    while (regionServer.getOnlineRegions(LABELS_TABLE_NAME).isEmpty()) {
+    while (regionServer.getRegions(LABELS_TABLE_NAME).isEmpty()) {
       try {
         Thread.sleep(10);
       } catch (InterruptedException e) {
       }
     }
-    Region labelsTableRegion = regionServer.getOnlineRegions(LABELS_TABLE_NAME).get(0);
+    Region labelsTableRegion = regionServer.getRegions(LABELS_TABLE_NAME).get(0);
     while (labelsTableRegion.isRecovering()) {
       try {
         Thread.sleep(10);

http://git-wip-us.apache.org/repos/asf/hbase/blob/bd68551f/hbase-server/src/test/java/org/apache/hadoop/hbase/snapshot/SnapshotTestingUtils.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/snapshot/SnapshotTestingUtils.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/snapshot/SnapshotTestingUtils.java
index 4a101a8..3f0b5b4 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/snapshot/SnapshotTestingUtils.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/snapshot/SnapshotTestingUtils.java
@@ -754,7 +754,7 @@ public final class SnapshotTestingUtils {
                                             final TableName tableName)
       throws IOException, InterruptedException {
     HRegionServer rs = util.getRSForFirstRegionInTable(tableName);
-    List<Region> onlineRegions = rs.getOnlineRegions(tableName);
+    List<Region> onlineRegions = rs.getRegions(tableName);
     for (Region region : onlineRegions) {
       region.waitForFlushesAndCompactions();
     }

http://git-wip-us.apache.org/repos/asf/hbase/blob/bd68551f/hbase-server/src/test/java/org/apache/hadoop/hbase/util/TestHBaseFsckEncryption.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/util/TestHBaseFsckEncryption.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/util/TestHBaseFsckEncryption.java
index a2b9c1a..641f66e 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/util/TestHBaseFsckEncryption.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/util/TestHBaseFsckEncryption.java
@@ -142,7 +142,7 @@ public class TestHBaseFsckEncryption {
   private List<Path> findStorefilePaths(TableName tableName) throws Exception {
     List<Path> paths = new ArrayList<>();
     for (Region region : TEST_UTIL.getRSForFirstRegionInTable(tableName)
-        .getOnlineRegions(htd.getTableName())) {
+        .getRegions(htd.getTableName())) {
       for (HStore store : ((HRegion) region).getStores()) {
         for (HStoreFile storefile : store.getStorefiles()) {
           paths.add(storefile.getPath());

http://git-wip-us.apache.org/repos/asf/hbase/blob/bd68551f/hbase-server/src/test/java/org/apache/hadoop/hbase/util/TestHBaseFsckOneRS.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/util/TestHBaseFsckOneRS.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/util/TestHBaseFsckOneRS.java
index 4188146..d2526ab 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/util/TestHBaseFsckOneRS.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/util/TestHBaseFsckOneRS.java
@@ -451,7 +451,7 @@ public class TestHBaseFsckOneRS extends BaseTestHBaseFsck {
       // flakiness of this test.
       HRegion r = HRegion.openHRegion(
           region, htdDisabled, hrs.getWAL(region), conf);
-      hrs.addToOnlineRegions(r);
+      hrs.addRegion(r);
 
       HBaseFsck hbck = doFsck(conf, false);
       assertErrors(hbck, new HBaseFsck.ErrorReporter.ERROR_CODE[] {

http://git-wip-us.apache.org/repos/asf/hbase/blob/bd68551f/hbase-server/src/test/java/org/apache/hadoop/hbase/wal/TestWALFiltering.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/wal/TestWALFiltering.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/wal/TestWALFiltering.java
index 196e70d..cbfeb2a 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/wal/TestWALFiltering.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/wal/TestWALFiltering.java
@@ -130,7 +130,7 @@ public class TestWALFiltering {
   private List<byte[]> getRegionsByServer(int rsId) throws IOException {
     List<byte[]> regionNames = Lists.newArrayList();
     HRegionServer hrs = getRegionServer(rsId);
-    for (Region r : hrs.getOnlineRegions(TABLE_NAME)) {
+    for (Region r : hrs.getRegions(TABLE_NAME)) {
       regionNames.add(r.getRegionInfo().getRegionName());
     }
     return regionNames;

http://git-wip-us.apache.org/repos/asf/hbase/blob/bd68551f/hbase-thrift/src/test/java/org/apache/hadoop/hbase/thrift/ErrorThrowingGetObserver.java
----------------------------------------------------------------------
diff --git a/hbase-thrift/src/test/java/org/apache/hadoop/hbase/thrift/ErrorThrowingGetObserver.java b/hbase-thrift/src/test/java/org/apache/hadoop/hbase/thrift/ErrorThrowingGetObserver.java
index fcd80d0..b988a58 100644
--- a/hbase-thrift/src/test/java/org/apache/hadoop/hbase/thrift/ErrorThrowingGetObserver.java
+++ b/hbase-thrift/src/test/java/org/apache/hadoop/hbase/thrift/ErrorThrowingGetObserver.java
@@ -62,7 +62,7 @@ public class ErrorThrowingGetObserver implements RegionObserver {
           throw new NotServingRegionException("Failing for test");
         case REGION_MOVED:
           throw new RegionMovedException(
-              e.getEnvironment().getRegionServerServices().getServerName(), 1);
+              e.getEnvironment().getCoprocessorRegionServerServices().getServerName(), 1);
         case SCANNER_RESET:
           throw new ScannerResetException("Failing for test");
         case UNKNOWN_SCANNER:


Mime
View raw message