diff --git a/broker/src/main/java/org/apache/rocketmq/broker/BrokerController.java b/broker/src/main/java/org/apache/rocketmq/broker/BrokerController.java index aaf06caddf8..05a00a50053 100644 --- a/broker/src/main/java/org/apache/rocketmq/broker/BrokerController.java +++ b/broker/src/main/java/org/apache/rocketmq/broker/BrokerController.java @@ -1010,7 +1010,7 @@ private void initialTransaction() { private void initialAcl() { if (!this.brokerConfig.isAclEnable()) { - LOG.info("The broker dose not enable acl"); + LOG.info("The broker does not enable acl"); return; } diff --git a/client/src/main/java/org/apache/rocketmq/client/impl/factory/MQClientInstance.java b/client/src/main/java/org/apache/rocketmq/client/impl/factory/MQClientInstance.java index c9fd3c83e04..ad0676d091c 100644 --- a/client/src/main/java/org/apache/rocketmq/client/impl/factory/MQClientInstance.java +++ b/client/src/main/java/org/apache/rocketmq/client/impl/factory/MQClientInstance.java @@ -1238,7 +1238,7 @@ public synchronized void resetOffset(String topic, String group, Map[] String name = briefMetas[i].getKey(); int index = ArrayUtils.indexOf(item.getItemNames(), name); if (index < 0) { - throw new IllegalArgumentException("illegal breifItemName: " + name); + throw new IllegalArgumentException("illegal briefItemName: " + name); } indexOfItems[i] = index; statisticsBriefs[i] = new StatisticsBrief(briefMetas[i].getValue()); diff --git a/common/src/main/java/org/apache/rocketmq/common/statistics/StatisticsItemScheduledIncrementPrinter.java b/common/src/main/java/org/apache/rocketmq/common/statistics/StatisticsItemScheduledIncrementPrinter.java index 2890e6e15cd..e1998473bf2 100644 --- a/common/src/main/java/org/apache/rocketmq/common/statistics/StatisticsItemScheduledIncrementPrinter.java +++ b/common/src/main/java/org/apache/rocketmq/common/statistics/StatisticsItemScheduledIncrementPrinter.java @@ -65,15 +65,15 @@ public void run() { item.getStatObject()); StatisticsItem increment = snapshot.subtract(lastSnapshot); - Interceptor inteceptor = item.getInterceptor(); - String inteceptorStr = formatInterceptor(inteceptor); - if (inteceptor != null) { - inteceptor.reset(); + Interceptor interceptor = item.getInterceptor(); + String interceptorStr = formatInterceptor(interceptor); + if (interceptor != null) { + interceptor.reset(); } StatisticsItemSampleBrief brief = getSampleBrief(item.getStatKind(), item.getStatObject()); if (brief != null && (!increment.allZeros() || printZeroLine())) { - printer.print(name, increment, inteceptorStr, brief.toString()); + printer.print(name, increment, interceptorStr, brief.toString()); } setItemSnapshot(lastItemSnapshots, snapshot); @@ -85,7 +85,7 @@ public void run() { }, getInitialDelay(), interval, TimeUnit.MILLISECONDS); addFuture(item, future); - // sample every TPS_INTREVAL + // sample every TPS_INTERVAL ScheduledFuture futureSample = executor.scheduleAtFixedRate(new Runnable() { @Override public void run() { diff --git a/remoting/src/main/java/org/apache/rocketmq/remoting/protocol/statictopic/TopicQueueMappingUtils.java b/remoting/src/main/java/org/apache/rocketmq/remoting/protocol/statictopic/TopicQueueMappingUtils.java index 45cbed75727..647669fde24 100644 --- a/remoting/src/main/java/org/apache/rocketmq/remoting/protocol/statictopic/TopicQueueMappingUtils.java +++ b/remoting/src/main/java/org/apache/rocketmq/remoting/protocol/statictopic/TopicQueueMappingUtils.java @@ -172,21 +172,21 @@ public static Map.Entry checkNameEpochNumConsistence(String topic if (scope != null && !scope.equals(mappingDetail.getScope())) { - throw new RuntimeException(String.format("scope dose not match %s != %s in %s", mappingDetail.getScope(), scope, broker)); + throw new RuntimeException(String.format("scope does not match %s != %s in %s", mappingDetail.getScope(), scope, broker)); } else { scope = mappingDetail.getScope(); } if (maxEpoch != -1 && maxEpoch != mappingDetail.getEpoch()) { - throw new RuntimeException(String.format("epoch dose not match %d != %d in %s", maxEpoch, mappingDetail.getEpoch(), mappingDetail.getBname())); + throw new RuntimeException(String.format("epoch does not match %d != %d in %s", maxEpoch, mappingDetail.getEpoch(), mappingDetail.getBname())); } else { maxEpoch = mappingDetail.getEpoch(); } if (maxNum != -1 && maxNum != mappingDetail.getTotalQueues()) { - throw new RuntimeException(String.format("total queue number dose not match %d != %d in %s", maxNum, mappingDetail.getTotalQueues(), mappingDetail.getBname())); + throw new RuntimeException(String.format("total queue number does not match %d != %d in %s", maxNum, mappingDetail.getTotalQueues(), mappingDetail.getBname())); } else { maxNum = mappingDetail.getTotalQueues(); } @@ -266,7 +266,7 @@ public static void checkLogicQueueMappingItemOffset(List throw new RuntimeException("The non-latest item has negative logic offset"); } if (lastGen != -1 && item.getGen() >= lastGen) { - throw new RuntimeException("The gen dose not increase monotonically"); + throw new RuntimeException("The gen does not increase monotonically"); } if (item.getEndOffset() != -1 @@ -276,10 +276,10 @@ public static void checkLogicQueueMappingItemOffset(List if (lastOffset != -1 && item.getLogicOffset() != -1) { if (item.getLogicOffset() >= lastOffset) { - throw new RuntimeException("The base logic offset dose not increase monotonically"); + throw new RuntimeException("The base logic offset does not increase monotonically"); } if (item.computeMaxStaticQueueOffset() >= lastOffset) { - throw new RuntimeException("The max logic offset dose not increase monotonically"); + throw new RuntimeException("The max logic offset does not increase monotonically"); } } lastGen = item.getGen(); @@ -321,11 +321,11 @@ public static void checkPhysicalQueueConsistence(Map items: configMapping.getMappingDetail().getHostedQueues().values()) { for (LogicQueueMappingItem item: items) { if (item.getStartOffset() != 0) { - throw new RuntimeException("The start offset dose not begin from 0"); + throw new RuntimeException("The start offset does not begin from 0"); } TopicConfig topicConfig = brokerConfigMap.get(item.getBname()); if (topicConfig == null) { - throw new RuntimeException("The broker of item dose not exist"); + throw new RuntimeException("The broker of item does not exist"); } if (item.getQueueId() >= topicConfig.getWriteQueueNums()) { throw new RuntimeException("The physical queue id is overflow the write queues"); @@ -365,7 +365,7 @@ public static Map checkAndBuildMappingItems(List< } if (checkConsistence) { if (maxNum != globalIdMap.size()) { - throw new RuntimeException(String.format("The total queue number in config dose not match the real hosted queues %d != %d", maxNum, globalIdMap.size())); + throw new RuntimeException(String.format("The total queue number in config does not match the real hosted queues %d != %d", maxNum, globalIdMap.size())); } for (int i = 0; i < maxNum; i++) { if (!globalIdMap.containsKey(i)) { @@ -417,7 +417,7 @@ public static void checkTargetBrokersComplete(Set targetBrokers, Map createStaticTopic(String topic, int queueNum, Set targetBrokers, DefaultMQAdminExt defaultMQAdminExt) throws Exception { Map brokerConfigMap = MQAdminUtils.examineTopicConfigAll(topic, defaultMQAdminExt); assert brokerConfigMap.isEmpty(); @@ -203,7 +203,7 @@ public static Map createStaticTopic(String t return brokerConfigMap; } - //should only be test, if some middle operation failed, it dose not backup the brokerConfigMap + //should only be test, if some middle operation failed, it does not backup the brokerConfigMap public static void remappingStaticTopic(String topic, Set targetBrokers, DefaultMQAdminExt defaultMQAdminExt) throws Exception { Map brokerConfigMap = MQAdminUtils.examineTopicConfigAll(topic, defaultMQAdminExt); assert !brokerConfigMap.isEmpty(); diff --git a/test/src/test/java/org/apache/rocketmq/test/client/consumer/broadcast/order/OrderMsgBroadcastIT.java b/test/src/test/java/org/apache/rocketmq/test/client/consumer/broadcast/order/OrderMsgBroadcastIT.java index 679fdd4f381..d1e2c0ddaf3 100644 --- a/test/src/test/java/org/apache/rocketmq/test/client/consumer/broadcast/order/OrderMsgBroadcastIT.java +++ b/test/src/test/java/org/apache/rocketmq/test/client/consumer/broadcast/order/OrderMsgBroadcastIT.java @@ -36,7 +36,7 @@ import static com.google.common.truth.Truth.assertThat; /** - * Currently, dose not support the ordered broadcast message + * Currently, does not support the ordered broadcast message */ @Ignore public class OrderMsgBroadcastIT extends BaseBroadcast {