MINOR: fix typos for metadata (#13889)

Reviewers: Divij Vaidya <diviv@amazon.com>, Deqi Hu <deqi.hu@shopee.com>
This commit is contained in:
minjian.cai 2023-06-21 21:09:15 +08:00 committed by GitHub
parent 9b383a1e9e
commit ba5e1acdfb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 9 deletions

View File

@ -1490,10 +1490,10 @@ public class ReplicationControlManager {
ControllerResult<Boolean> maybeBalancePartitionLeaders() {
List<ApiMessageAndVersion> records = new ArrayList<>();
boolean rescheduleImmidiately = false;
boolean rescheduleImmediately = false;
for (TopicIdPartition topicPartition : imbalancedPartitions) {
if (records.size() >= maxElectionsPerImbalance) {
rescheduleImmidiately = true;
rescheduleImmediately = true;
break;
}
@ -1521,7 +1521,7 @@ public class ReplicationControlManager {
builder.build().ifPresent(records::add);
}
return ControllerResult.of(records, rescheduleImmidiately);
return ControllerResult.of(records, rescheduleImmediately);
}
ControllerResult<List<CreatePartitionsTopicResult>> createPartitions(

View File

@ -66,7 +66,7 @@ public class KRaftMigrationZkWriter {
private static final String CREATE_TOPIC = "CreateTopic";
private static final String UPDATE_TOPIC = "UpdateTopic";
private static final String DELETE_TOPIC = "DeleteTopic";
private static final String UPDATE_PARTITON = "UpdatePartition";
private static final String UPDATE_PARTITION = "UpdatePartition";
private static final String DELETE_PARTITION = "DeletePartition";
private static final String UPDATE_BROKER_CONFIG = "UpdateBrokerConfig";
private static final String DELETE_BROKER_CONFIG = "DeleteBrokerConfig";
@ -232,7 +232,7 @@ public class KRaftMigrationZkWriter {
newPartitions.forEach((topicId, partitionMap) -> {
TopicImage topic = topicsImage.getTopic(topicId);
operationConsumer.accept(
UPDATE_PARTITON,
UPDATE_PARTITION,
"Creating additional partitions for Topic " + topic.name() + ", ID " + topicId,
migrationState -> migrationClient.topicClient().updateTopicPartitions(
Collections.singletonMap(topic.name(), partitionMap),
@ -242,7 +242,7 @@ public class KRaftMigrationZkWriter {
changedPartitions.forEach((topicId, partitionMap) -> {
TopicImage topic = topicsImage.getTopic(topicId);
operationConsumer.accept(
UPDATE_PARTITON,
UPDATE_PARTITION,
"Updating Partitions for Topic " + topic.name() + ", ID " + topicId,
migrationState -> migrationClient.topicClient().updateTopicPartitions(
Collections.singletonMap(topic.name(), partitionMap),
@ -295,7 +295,7 @@ public class KRaftMigrationZkWriter {
Map<Integer, PartitionRegistration> changedPartitions = topicDelta.partitionChanges();
if (!newPartitions.isEmpty()) {
operationConsumer.accept(
UPDATE_PARTITON,
UPDATE_PARTITION,
"Create new partitions for Topic " + topicDelta.name() + ", ID " + topicId,
migrationState -> migrationClient.topicClient().createTopicPartitions(
Collections.singletonMap(topicDelta.name(), newPartitions),
@ -306,7 +306,7 @@ public class KRaftMigrationZkWriter {
// Need a final for the lambda
final Map<Integer, PartitionRegistration> finalChangedPartitions = changedPartitions;
operationConsumer.accept(
UPDATE_PARTITON,
UPDATE_PARTITION,
"Updating Partitions for Topic " + topicDelta.name() + ", ID " + topicId,
migrationState -> migrationClient.topicClient().updateTopicPartitions(
Collections.singletonMap(topicDelta.name(), finalChangedPartitions),

View File

@ -369,7 +369,7 @@ public class FeatureControlManagerTest {
}
@Test
public void testCanotDowngradeBefore3_3_IV0() {
public void testCannotDowngradeBefore3_3_IV0() {
FeatureControlManager manager = new FeatureControlManager.Builder().
setQuorumFeatures(features(MetadataVersion.FEATURE_NAME,
MetadataVersion.IBP_3_0_IV0.featureLevel(), MetadataVersion.IBP_3_3_IV3.featureLevel())).