|
18 | 18 | package org.apache.hadoop.hdfs.server.balancer; |
19 | 19 |
|
20 | 20 | import static org.apache.hadoop.fs.CommonConfigurationKeysPublic.IPC_CLIENT_CONNECT_MAX_RETRIES_KEY; |
21 | | -import static org.apache.hadoop.hdfs.DFSConfigKeys.DFS_HA_ALLOW_STALE_READ_DEFAULT; |
22 | | -import static org.apache.hadoop.hdfs.DFSConfigKeys.DFS_HA_ALLOW_STALE_READ_KEY; |
23 | | -import static org.apache.hadoop.hdfs.DFSConfigKeys.DFS_HA_TAILEDITS_PERIOD_KEY; |
| 21 | +import static org.apache.hadoop.hdfs.DFSConfigKeys.*; |
24 | 22 | import static org.junit.Assert.assertEquals; |
25 | 23 | import static org.junit.Assert.assertTrue; |
26 | 24 | import static org.mockito.ArgumentMatchers.any; |
@@ -147,7 +145,8 @@ void doTest(Configuration conf, boolean withHA) throws Exception { |
147 | 145 | / numOfDatanodes, (short) numOfDatanodes, 0); |
148 | 146 |
|
149 | 147 | boolean isRequestStandby = conf.getBoolean( |
150 | | - DFS_HA_ALLOW_STALE_READ_KEY, DFS_HA_ALLOW_STALE_READ_DEFAULT); |
| 148 | + DFS_NAMENODE_GETBLOCKS_CHECK_OPERATION_KEY, |
| 149 | + DFS_NAMENODE_GETBLOCKS_CHECK_OPERATION_DEFAULT); |
151 | 150 | if (isRequestStandby) { |
152 | 151 | HATestUtil.waitForStandbyToCatchUp(cluster.getNameNode(0), |
153 | 152 | cluster.getNameNode(1)); |
@@ -182,7 +181,7 @@ void doTest(Configuration conf, boolean withHA) throws Exception { |
182 | 181 | @Test(timeout = 60000) |
183 | 182 | public void testBalancerRequestSBNWithHA() throws Exception { |
184 | 183 | Configuration conf = new HdfsConfiguration(); |
185 | | - conf.setBoolean(DFS_HA_ALLOW_STALE_READ_KEY, true); |
| 184 | + conf.setBoolean(DFS_NAMENODE_GETBLOCKS_CHECK_OPERATION_KEY, false); |
186 | 185 | conf.setLong(DFS_HA_TAILEDITS_PERIOD_KEY, 1); |
187 | 186 | //conf.setBoolean(DFS_HA_BALANCER_REQUEST_STANDBY_KEY, true); |
188 | 187 | TestBalancer.initConf(conf); |
@@ -329,8 +328,8 @@ nsId, new Path("/test"), |
329 | 328 | nncActive.close(); |
330 | 329 |
|
331 | 330 | // Request to standby namenode. |
332 | | - conf.setBoolean(DFSConfigKeys.DFS_HA_ALLOW_STALE_READ_KEY, |
333 | | - true); |
| 331 | + conf.setBoolean(DFS_NAMENODE_GETBLOCKS_CHECK_OPERATION_KEY, |
| 332 | + false); |
334 | 333 | NameNodeConnector nncStandby = new NameNodeConnector( |
335 | 334 | "nncStandby", namenode, |
336 | 335 | nsId, new Path("/test"), |
|
0 commit comments