From 5db63014b00da11ccd0408886e4ae842f6b8d277 Mon Sep 17 00:00:00 2001 From: Umesh Agashe Date: Fri, 16 Jun 2017 14:12:54 -0700 Subject: [PATCH] HBASE-18227 Fixed unit test hbase.coprocessor.TestCoprocessorMetrics#testRegionObserverAfterRegionClosed Calling closeRegion() directly on remote server is not supported post-AMv2. Calling unassign() on master Signed-off-by: Michael Stack --- .../apache/hadoop/hbase/coprocessor/TestCoprocessorMetrics.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/coprocessor/TestCoprocessorMetrics.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/coprocessor/TestCoprocessorMetrics.java index 16bb6d93a21..e7b71ecadf7 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/coprocessor/TestCoprocessorMetrics.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/coprocessor/TestCoprocessorMetrics.java @@ -472,7 +472,7 @@ public class TestCoprocessorMetrics { // close one of the regions try (RegionLocator locator = connection.getRegionLocator(tableName)) { HRegionLocation loc = locator.getRegionLocation(foo); - admin.closeRegion(loc.getServerName(), loc.getRegionInfo()); + admin.unassign(loc.getRegionInfo().getEncodedNameAsBytes(), true); HRegionServer server = UTIL.getMiniHBaseCluster().getRegionServer(loc.getServerName()); UTIL.waitFor(30000,