diff --git a/pulsar-broker/src/main/java/org/apache/pulsar/PulsarClusterMetadataSetup.java b/pulsar-broker/src/main/java/org/apache/pulsar/PulsarClusterMetadataSetup.java index 96ea8877c5b61..427c89fd9a05f 100644 --- a/pulsar-broker/src/main/java/org/apache/pulsar/PulsarClusterMetadataSetup.java +++ b/pulsar-broker/src/main/java/org/apache/pulsar/PulsarClusterMetadataSetup.java @@ -281,7 +281,7 @@ public static void main(String[] args) throws Exception { try { initializeCluster(arguments, bundleNumberForDefaultNamespace); } catch (Exception e) { - System.err.println("Unexpected error occured."); + System.err.println("Unexpected error occurred."); e.printStackTrace(System.err); System.err.println("Terminating JVM..."); ShutdownUtil.triggerImmediateForcefulShutdown(); diff --git a/pulsar-broker/src/main/java/org/apache/pulsar/broker/loadbalance/impl/LinuxBrokerHostUsageImpl.java b/pulsar-broker/src/main/java/org/apache/pulsar/broker/loadbalance/impl/LinuxBrokerHostUsageImpl.java index 6d0e6bb907346..9e97e3d8156c5 100644 --- a/pulsar-broker/src/main/java/org/apache/pulsar/broker/loadbalance/impl/LinuxBrokerHostUsageImpl.java +++ b/pulsar-broker/src/main/java/org/apache/pulsar/broker/loadbalance/impl/LinuxBrokerHostUsageImpl.java @@ -155,7 +155,7 @@ private double getTotalCpuUsageForCGroup(double elapsedTimeSeconds) { * * * Line is split in "words", filtering the first. The sum of all numbers give the amount of cpu cycles used this - * far. Real CPU usage should equal the sum substracting the idle cycles(that is idle+iowait), this would include + * far. Real CPU usage should equal the sum subtracting the idle cycles(that is idle+iowait), this would include * cpu, user, nice, system, irq, softirq, steal, guest and guest_nice. */ private double getTotalCpuUsageForEntireHost() { diff --git a/pulsar-broker/src/main/java/org/apache/pulsar/broker/qos/AsyncTokenBucket.java b/pulsar-broker/src/main/java/org/apache/pulsar/broker/qos/AsyncTokenBucket.java index ac9a1f03e592b..6548f6fe5fac5 100644 --- a/pulsar-broker/src/main/java/org/apache/pulsar/broker/qos/AsyncTokenBucket.java +++ b/pulsar-broker/src/main/java/org/apache/pulsar/broker/qos/AsyncTokenBucket.java @@ -257,7 +257,7 @@ public boolean consumeTokensAndCheckIfContainsTokens(long consumeTokens) { } else if (currentTokens == Long.MIN_VALUE) { // when currentTokens is Long.MIN_VALUE, the current tokens balance is unknown since consumed tokens // was added to the pendingConsumedTokens LongAdder counter. In this case, assume that tokens balance - // hasn't been updated yet and calculate a best guess of the current value by substracting the consumed + // hasn't been updated yet and calculate a best guess of the current value by subtracting the consumed // tokens from the current tokens balance return tokens - consumeTokens > 0; } else { diff --git a/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/PersistentTopic.java b/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/PersistentTopic.java index 056fad2a005b4..db8d33200bc1e 100644 --- a/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/PersistentTopic.java +++ b/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/PersistentTopic.java @@ -328,7 +328,7 @@ private static class EstimateTimeBasedBacklogQuotaCheckResult { * 2. Namespace bundle transfer or unloading. * a. The unloading topic triggered by unloading namespace bundles will not wait for clients disconnect. Relate * to {@link CloseFutures#notWaitDisconnectClients}. - * b. The unloading topic triggered by unloading namespace bundles was seperated to two steps when using + * b. The unloading topic triggered by unloading namespace bundles was separated to two steps when using * {@link ExtensibleLoadManagerImpl}. * b-1. step-1: fence the topic on the original Broker, and do not trigger reconnections of clients. Relate * to {@link CloseFutures#transferring}. This step is a half closing. @@ -3140,7 +3140,7 @@ public void checkGC() { * "replicator.producer" to a null value. * Race condition: task 1 will get a NPE when it tries to send messages using the variable * "replicator.producer", because task 2 will set this variable to "null". - * TODO Create a seperated PR to fix it. + * TODO Create a separated PR to fix it. */ closeReplProducersIfNoBacklog().thenRun(() -> { if (hasRemoteProducers()) { diff --git a/pulsar-broker/src/test/java/org/apache/pulsar/broker/admin/GetPartitionMetadataMultiBrokerTest.java b/pulsar-broker/src/test/java/org/apache/pulsar/broker/admin/GetPartitionMetadataMultiBrokerTest.java index d1eeabdb3d7cc..92ec802be6a55 100644 --- a/pulsar-broker/src/test/java/org/apache/pulsar/broker/admin/GetPartitionMetadataMultiBrokerTest.java +++ b/pulsar-broker/src/test/java/org/apache/pulsar/broker/admin/GetPartitionMetadataMultiBrokerTest.java @@ -135,7 +135,7 @@ protected void verifyPartitionsNeverCreated(String topicNameStr) throws Exceptio } catch (Exception ex) { // If the namespace bundle has not been loaded yet, it means no non-persistent topic was created. So // this behavior is also correct. - // This error is not expected, a seperated PR is needed to fix this issue. + // This error is not expected, a separated PR is needed to fix this issue. assertTrue(ex.getMessage().contains("Failed to find ownership for")); } } @@ -148,7 +148,7 @@ protected void verifyNonPartitionedTopicNeverCreated(String topicNameStr) throws } catch (Exception ex) { // If the namespace bundle has not been loaded yet, it means no non-persistent topic was created. So // this behavior is also correct. - // This error is not expected, a seperated PR is needed to fix this issue. + // This error is not expected, a separated PR is needed to fix this issue. assertTrue(ex.getMessage().contains("Failed to find ownership for")); } }