You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tubemq.apache.org by go...@apache.org on 2020/04/08 06:41:28 UTC

[incubator-tubemq] branch master updated: [TUBEMQ-58] fix some typos (#45)

This is an automated email from the ASF dual-hosted git repository.

gosonzhang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-tubemq.git


The following commit(s) were added to refs/heads/master by this push:
     new f0ec02a  [TUBEMQ-58] fix some typos (#45)
f0ec02a is described below

commit f0ec02a43d7adcd4b282cbaebd63bcdc194e06ed
Author: Tboy <gu...@immomo.com>
AuthorDate: Wed Apr 8 14:41:21 2020 +0800

    [TUBEMQ-58] fix some typos (#45)
---
 .../java/org/apache/tubemq/client/producer/ProducerManager.java   | 8 ++++----
 .../org/apache/tubemq/client/producer/SimpleMessageProducer.java  | 4 ++--
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/tubemq-client/src/main/java/org/apache/tubemq/client/producer/ProducerManager.java b/tubemq-client/src/main/java/org/apache/tubemq/client/producer/ProducerManager.java
index 7ea6539..5335464 100644
--- a/tubemq-client/src/main/java/org/apache/tubemq/client/producer/ProducerManager.java
+++ b/tubemq-client/src/main/java/org/apache/tubemq/client/producer/ProducerManager.java
@@ -473,14 +473,14 @@ public class ProducerManager {
     }
 
     private void updateTopicPartitions(List<TopicInfo> topicInfoList) {
-        Map<String, Map<Integer, List<Partition>>> paritionListMap =
+        Map<String, Map<Integer, List<Partition>>> partitionListMap =
                 new ConcurrentHashMap<String, Map<Integer, List<Partition>>>();
         for (TopicInfo topicInfo : topicInfoList) {
             Map<Integer, List<Partition>> brokerPartList =
-                    paritionListMap.get(topicInfo.getTopic());
+                    partitionListMap.get(topicInfo.getTopic());
             if (brokerPartList == null) {
                 brokerPartList = new ConcurrentHashMap<Integer, List<Partition>>();
-                paritionListMap.put(topicInfo.getTopic(), brokerPartList);
+                partitionListMap.put(topicInfo.getTopic(), brokerPartList);
             }
             for (int j = 0; j < topicInfo.getTopicStoreNum(); j++) {
                 int baseValue = j * TBaseConstants.META_STORE_INS_BASE;
@@ -496,7 +496,7 @@ public class ProducerManager {
                 }
             }
         }
-        topicPartitionMap = paritionListMap;
+        topicPartitionMap = partitionListMap;
     }
 
     private synchronized String generateProducerID() throws Exception {
diff --git a/tubemq-client/src/main/java/org/apache/tubemq/client/producer/SimpleMessageProducer.java b/tubemq-client/src/main/java/org/apache/tubemq/client/producer/SimpleMessageProducer.java
index 48e1bf9..257e9d8 100644
--- a/tubemq-client/src/main/java/org/apache/tubemq/client/producer/SimpleMessageProducer.java
+++ b/tubemq-client/src/main/java/org/apache/tubemq/client/producer/SimpleMessageProducer.java
@@ -139,8 +139,8 @@ public class SimpleMessageProducer implements MessageProducer {
             newTopicSet.add(topicItem.trim());
         }
         long curTime = System.currentTimeMillis();
-        for (String topicNam : newTopicSet) {
-            publishTopicMap.putIfAbsent(topicNam, curTime);
+        for (String topicName : newTopicSet) {
+            publishTopicMap.putIfAbsent(topicName, curTime);
         }
         return this.producerManager.publish(newTopicSet);
     }