HBASE-22187 Removed remaining usages of ClusterConnection.clearRegionCache

This commit is contained in:
Jan Hentschel 2019-04-08 10:11:07 +02:00
parent a4f20a1211
commit b5b1f86dc7
No known key found for this signature in database
GPG Key ID: 5CD818B19CC299A3
6 changed files with 11 additions and 11 deletions

View File

@ -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

View File

@ -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();
}
}

View File

@ -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");

View File

@ -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());

View File

@ -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

View File

@ -308,7 +308,7 @@ public class BaseTestHBaseFsck {
tbl = null;
}
((ClusterConnection) connection).clearRegionCache();
((ClusterConnection) connection).clearRegionLocationCache();
deleteTable(TEST_UTIL, tablename);
}