Skip to content

Commit

Permalink
[ISSUE #8848] Fix log typo
Browse files Browse the repository at this point in the history
  • Loading branch information
mawen12 authored Oct 23, 2024
1 parent a024dc8 commit c033c3e
Show file tree
Hide file tree
Showing 8 changed files with 23 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1238,7 +1238,7 @@ public synchronized void resetOffset(String topic, String group, Map<MessageQueu
if (impl instanceof DefaultMQPushConsumerImpl) {
consumer = (DefaultMQPushConsumerImpl) impl;
} else {
log.info("[reset-offset] consumer dose not exist. group={}", group);
log.info("[reset-offset] consumer does not exist. group={}", group);
return;
}
consumer.suspend();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public StatisticsBriefInterceptor(StatisticsItem item, Pair<String, long[][]>[]
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());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,21 +172,21 @@ public static Map.Entry<Long, Integer> 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();
}
Expand Down Expand Up @@ -266,7 +266,7 @@ public static void checkLogicQueueMappingItemOffset(List<LogicQueueMappingItem>
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
Expand All @@ -276,10 +276,10 @@ public static void checkLogicQueueMappingItemOffset(List<LogicQueueMappingItem>

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();
Expand Down Expand Up @@ -321,11 +321,11 @@ public static void checkPhysicalQueueConsistence(Map<String, TopicConfigAndQueu
for (List<LogicQueueMappingItem> 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");
Expand Down Expand Up @@ -365,7 +365,7 @@ public static Map<Integer, TopicQueueMappingOne> 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)) {
Expand Down Expand Up @@ -417,7 +417,7 @@ public static void checkTargetBrokersComplete(Set<String> targetBrokers, Map<Str
continue;
}
if (!targetBrokers.contains(broker)) {
throw new RuntimeException("The existed broker " + broker + " dose not in target brokers ");
throw new RuntimeException("The existed broker " + broker + " does not in target brokers ");
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ public void shutdown() {

// be careful.
// if the format of timerlog changed, this offset has to be changed too
// so dose the batch writing
// so does the batch writing
public int getOffsetForLastUnit() {

return fileSize - (fileSize - MIN_BLANK_LEN) % UNIT_SIZE - MIN_BLANK_LEN - UNIT_SIZE;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ public static boolean checkStaticTopic(String topic, DefaultMQAdminExt defaultMQ
return true;
}

//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 Map<String, TopicConfigAndQueueMapping> createStaticTopic(String topic, int queueNum, Set<String> targetBrokers, DefaultMQAdminExt defaultMQAdminExt) throws Exception {
Map<String, TopicConfigAndQueueMapping> brokerConfigMap = MQAdminUtils.examineTopicConfigAll(topic, defaultMQAdminExt);
assert brokerConfigMap.isEmpty();
Expand All @@ -203,7 +203,7 @@ public static Map<String, TopicConfigAndQueueMapping> 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<String> targetBrokers, DefaultMQAdminExt defaultMQAdminExt) throws Exception {
Map<String, TopicConfigAndQueueMapping> brokerConfigMap = MQAdminUtils.examineTopicConfigAll(topic, defaultMQAdminExt);
assert !brokerConfigMap.isEmpty();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit c033c3e

Please sign in to comment.