Skip to content

Commit f33d40d

Browse files
author
ZhangJian He
authored
chore: remove dead config ensemblePlacementPolicyOrderSlowBookies (#4415)
Fix #3514 ### Motivation This configuration may have initially intended to add a switch in `slowBookies`, but it was overlooked. I reset the history to when the code was merged into the master branch; it is still only referenced in the test files. Furthermore, even if the test call is removed, the test cases still pass. Therefore, I think it is reasonable to remove it. Signed-off-by: ZhangJian He <shoothzj@gmail.com>
1 parent 5ee9ed1 commit f33d40d

File tree

3 files changed

+0
-27
lines changed

3 files changed

+0
-27
lines changed

bookkeeper-server/src/main/java/org/apache/bookkeeper/conf/ClientConfiguration.java

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -159,8 +159,6 @@ public class ClientConfiguration extends AbstractConfiguration<ClientConfigurati
159159
public static final String ENSEMBLE_PLACEMENT_POLICY = "ensemblePlacementPolicy";
160160
protected static final String NETWORK_TOPOLOGY_STABILIZE_PERIOD_SECONDS = "networkTopologyStabilizePeriodSeconds";
161161
protected static final String READ_REORDER_THRESHOLD_PENDING_REQUESTS = "readReorderThresholdPendingRequests";
162-
protected static final String ENSEMBLE_PLACEMENT_POLICY_ORDER_SLOW_BOOKIES =
163-
"ensemblePlacementPolicyOrderSlowBookies";
164162
protected static final String BOOKIE_ADDRESS_RESOLVER_ENABLED = "bookieAddressResolverEnabled";
165163
// Use hostname to resolve local placement info
166164
public static final String USE_HOSTNAME_RESOLVE_LOCAL_NODE_PLACEMENT_POLICY =
@@ -1290,27 +1288,6 @@ public ClientConfiguration setNetworkTopologyStabilizePeriodSeconds(int seconds)
12901288
return this;
12911289
}
12921290

1293-
/**
1294-
* Whether to order slow bookies in placement policy.
1295-
*
1296-
* @return flag of whether to order slow bookies in placement policy or not.
1297-
*/
1298-
public boolean getEnsemblePlacementPolicySlowBookies() {
1299-
return getBoolean(ENSEMBLE_PLACEMENT_POLICY_ORDER_SLOW_BOOKIES, false);
1300-
}
1301-
1302-
/**
1303-
* Enable/Disable ordering slow bookies in placement policy.
1304-
*
1305-
* @param enabled
1306-
* flag to enable/disable ordering slow bookies in placement policy.
1307-
* @return client configuration.
1308-
*/
1309-
public ClientConfiguration setEnsemblePlacementPolicySlowBookies(boolean enabled) {
1310-
setProperty(ENSEMBLE_PLACEMENT_POLICY_ORDER_SLOW_BOOKIES, enabled);
1311-
return this;
1312-
}
1313-
13141291
/**
13151292
* Whether to enable BookieAddressResolver.
13161293
*

bookkeeper-server/src/test/java/org/apache/bookkeeper/client/TestSpeculativeBatchRead.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,6 @@ BookKeeperTestClient createClient(int specTimeout) throws Exception {
7979
.setReadTimeout(30000)
8080
.setUseV2WireProtocol(true)
8181
.setReorderReadSequenceEnabled(true)
82-
.setEnsemblePlacementPolicySlowBookies(true)
8382
.setMetadataServiceUri(zkUtil.getMetadataServiceUri());
8483
return new BookKeeperTestClient(conf, new TestStatsProvider());
8584
}
@@ -389,7 +388,6 @@ public void testSequenceReadLocalEnsemble() throws Exception {
389388
.setSpeculativeReadTimeout(1000)
390389
.setEnsemblePlacementPolicy(LocalBookieEnsemblePlacementPolicy.class)
391390
.setReorderReadSequenceEnabled(true)
392-
.setEnsemblePlacementPolicySlowBookies(true)
393391
.setMetadataServiceUri(zkUtil.getMetadataServiceUri());
394392
BookKeeper bkspec = new BookKeeperTestClient(conf, new TestStatsProvider());
395393
LedgerHandle l = bkspec.createLedger(1, 1, digestType, passwd);

bookkeeper-server/src/test/java/org/apache/bookkeeper/client/TestSpeculativeRead.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,6 @@ BookKeeperTestClient createClient(int specTimeout) throws Exception {
7878
.setSpeculativeReadTimeout(specTimeout)
7979
.setReadTimeout(30000)
8080
.setReorderReadSequenceEnabled(true)
81-
.setEnsemblePlacementPolicySlowBookies(true)
8281
.setMetadataServiceUri(zkUtil.getMetadataServiceUri());
8382
return new BookKeeperTestClient(conf, new TestStatsProvider());
8483
}
@@ -391,7 +390,6 @@ public void testSequenceReadLocalEnsemble() throws Exception {
391390
.setSpeculativeReadTimeout(1000)
392391
.setEnsemblePlacementPolicy(LocalBookieEnsemblePlacementPolicy.class)
393392
.setReorderReadSequenceEnabled(true)
394-
.setEnsemblePlacementPolicySlowBookies(true)
395393
.setMetadataServiceUri(zkUtil.getMetadataServiceUri());
396394
try (BookKeeper bkc = new BookKeeperTestClient(conf, new TestStatsProvider())) {
397395
LedgerHandle l = bkc.createLedger(1, 1, digestType, passwd);

0 commit comments

Comments
 (0)