From commits-return-84948-apmail-hbase-commits-archive=hbase.apache.org@hbase.apache.org Fri Apr 12 08:07:47 2019 Return-Path: X-Original-To: apmail-hbase-commits-archive@www.apache.org Delivered-To: apmail-hbase-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by minotaur.apache.org (Postfix) with SMTP id C630819035 for ; Fri, 12 Apr 2019 08:07:46 +0000 (UTC) Received: (qmail 85770 invoked by uid 500); 12 Apr 2019 08:07:46 -0000 Delivered-To: apmail-hbase-commits-archive@hbase.apache.org Received: (qmail 85730 invoked by uid 500); 12 Apr 2019 08:07:45 -0000 Mailing-List: contact commits-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@hbase.apache.org Delivered-To: mailing list commits@hbase.apache.org Received: (qmail 85721 invoked by uid 99); 12 Apr 2019 08:07:45 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 12 Apr 2019 08:07:45 +0000 Received: by gitbox.apache.org (ASF Mail Server at gitbox.apache.org, from userid 33) id E198A814C8; Fri, 12 Apr 2019 08:07:45 +0000 (UTC) Date: Fri, 12 Apr 2019 08:07:45 +0000 To: "commits@hbase.apache.org" Subject: [hbase] branch branch-2 updated: HBASE-22187 Removed remaining usages of ClusterConnection.clearRegionCache MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Message-ID: <155505646579.8795.125083690184955878@gitbox.apache.org> From: janh@apache.org X-Git-Host: gitbox.apache.org X-Git-Repo: hbase X-Git-Refname: refs/heads/branch-2 X-Git-Reftype: branch X-Git-Oldrev: a4f20a1211e04ae921a56cbd8f0b588aad14bbb2 X-Git-Newrev: b5b1f86dc76db8d7828c07900955162797e2f351 X-Git-Rev: b5b1f86dc76db8d7828c07900955162797e2f351 X-Git-NotificationType: ref_changed_plus_diff X-Git-Multimail-Version: 1.5.dev Auto-Submitted: auto-generated This is an automated email from the ASF dual-hosted git repository. janh pushed a commit to branch branch-2 in repository https://gitbox.apache.org/repos/asf/hbase.git The following commit(s) were added to refs/heads/branch-2 by this push: new b5b1f86 HBASE-22187 Removed remaining usages of ClusterConnection.clearRegionCache b5b1f86 is described below commit b5b1f86dc76db8d7828c07900955162797e2f351 Author: Jan Hentschel AuthorDate: Mon Apr 8 10:11:07 2019 +0200 HBASE-22187 Removed remaining usages of ClusterConnection.clearRegionCache --- .../src/main/java/org/apache/hadoop/hbase/client/HTable.java | 2 +- .../main/java/org/apache/hadoop/hbase/util/RegionSplitter.java | 4 ++-- .../java/org/apache/hadoop/hbase/client/TestMetaWithReplicas.java | 4 ++-- .../java/org/apache/hadoop/hbase/client/TestReplicasClient.java | 8 ++++---- .../apache/hadoop/hbase/client/TestSeparateClientZKCluster.java | 2 +- .../test/java/org/apache/hadoop/hbase/util/BaseTestHBaseFsck.java | 2 +- 6 files changed, 11 insertions(+), 11 deletions(-) diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HTable.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HTable.java index 9b3afd9..60d16a9 100644 --- a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HTable.java +++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HTable.java @@ -936,7 +936,7 @@ public class HTable implements Table { * This is a power user function: avoid unless you know the ramifications. */ public void clearRegionCache() { - this.connection.clearRegionCache(); + this.connection.clearRegionLocationCache(); } @Override diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/util/RegionSplitter.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/util/RegionSplitter.java index 1b58634..0673c2f 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/util/RegionSplitter.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/util/RegionSplitter.java @@ -707,7 +707,7 @@ public class RegionSplitter { Path tableDir = tableDirAndSplitFile.getFirst(); FileSystem fs = tableDir.getFileSystem(connection.getConfiguration()); // Clear the cache to forcibly refresh region information - ((ClusterConnection)connection).clearRegionCache(); + ((ClusterConnection)connection).clearRegionLocationCache(); TableDescriptor htd = null; try (Table table = connection.getTable(tableName)) { htd = table.getDescriptor(); @@ -768,7 +768,7 @@ public class RegionSplitter { } catch (NoServerForRegionException nsfre) { LOG.debug("No Server Exception thrown for: " + splitAlgo.rowToStr(start)); physicalSplitting.add(region); - ((ClusterConnection)connection).clearRegionCache(); + ((ClusterConnection)connection).clearRegionLocationCache(); } } diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestMetaWithReplicas.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestMetaWithReplicas.java index e923911..bb8a5cd 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestMetaWithReplicas.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestMetaWithReplicas.java @@ -253,7 +253,7 @@ public class TestMetaWithReplicas { util.getHBaseClusterInterface().killRegionServer(primary); util.getHBaseClusterInterface().waitForRegionServerToStop(primary, 60000); } - ((ClusterConnection)c).clearRegionCache(); + ((ClusterConnection)c).clearRegionLocationCache(); } LOG.info("Running GETs"); Get get = null; @@ -276,7 +276,7 @@ public class TestMetaWithReplicas { util.getHBaseClusterInterface().startRegionServer(primary.getHostname(), 0); util.getHBaseClusterInterface().waitForActiveAndReadyMaster(); LOG.info("Master active!"); - ((ClusterConnection)c).clearRegionCache(); + ((ClusterConnection)c).clearRegionLocationCache(); } conf.setBoolean(HConstants.USE_META_REPLICAS, false); LOG.info("Running GETs no replicas"); diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestReplicasClient.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestReplicasClient.java index 311f651..719912d 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestReplicasClient.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestReplicasClient.java @@ -229,7 +229,7 @@ public class TestReplicasClient { @Before public void before() throws IOException { - ((ClusterConnection) HTU.getAdmin().getConnection()).clearRegionCache(); + ((ClusterConnection) HTU.getAdmin().getConnection()).clearRegionLocationCache(); try { openRegion(hriPrimary); } catch (Exception ignored) { @@ -251,7 +251,7 @@ public class TestReplicasClient { } catch (Exception ignored) { } - ((ClusterConnection) HTU.getAdmin().getConnection()).clearRegionCache(); + ((ClusterConnection) HTU.getAdmin().getConnection()).clearRegionLocationCache(); } private HRegionServer getRS() { @@ -332,14 +332,14 @@ public class TestReplicasClient { ClusterConnection hc = (ClusterConnection) HTU.getAdmin().getConnection(); try { - hc.clearRegionCache(); + hc.clearRegionLocationCache(); RegionLocations rl = hc.locateRegion(table.getName(), b1, false, false); Assert.assertEquals(2, rl.size()); rl = hc.locateRegion(table.getName(), b1, true, false); Assert.assertEquals(2, rl.size()); - hc.clearRegionCache(); + hc.clearRegionLocationCache(); rl = hc.locateRegion(table.getName(), b1, true, false); Assert.assertEquals(2, rl.size()); diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestSeparateClientZKCluster.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestSeparateClientZKCluster.java index 511d072..f44ef28 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestSeparateClientZKCluster.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestSeparateClientZKCluster.java @@ -218,7 +218,7 @@ public class TestSeparateClientZKCluster { put.addColumn(family, qualifier, value); table.put(put); // invalid connection cache - conn.clearRegionCache(); + conn.clearRegionLocationCache(); // stop client zk cluster clientZkCluster.shutdown(); // stop current meta server and confirm the server shutdown process diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/util/BaseTestHBaseFsck.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/util/BaseTestHBaseFsck.java index fc23d51..40ce1c5 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/util/BaseTestHBaseFsck.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/util/BaseTestHBaseFsck.java @@ -308,7 +308,7 @@ public class BaseTestHBaseFsck { tbl = null; } - ((ClusterConnection) connection).clearRegionCache(); + ((ClusterConnection) connection).clearRegionLocationCache(); deleteTable(TEST_UTIL, tablename); }