ayanamist commented on a change in pull request #2757:
URL: https://github.com/apache/rocketmq/pull/2757#discussion_r604743843



##########
File path: 
broker/src/main/java/org/apache/rocketmq/broker/loadbalance/AssignmentManager.java
##########
@@ -0,0 +1,149 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.rocketmq.broker.loadbalance;
+
+import com.google.common.collect.Lists;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.Executors;
+import java.util.concurrent.ScheduledExecutorService;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.locks.Lock;
+import java.util.concurrent.locks.ReentrantLock;
+import org.apache.rocketmq.broker.BrokerController;
+import org.apache.rocketmq.broker.out.BrokerOuterAPI;
+import org.apache.rocketmq.client.exception.MQBrokerException;
+import org.apache.rocketmq.client.impl.factory.MQClientInstance;
+import org.apache.rocketmq.common.MixAll;
+import org.apache.rocketmq.common.ThreadFactoryImpl;
+import org.apache.rocketmq.common.constant.LoggerName;
+import org.apache.rocketmq.common.message.MessageQueue;
+import org.apache.rocketmq.common.protocol.ResponseCode;
+import org.apache.rocketmq.common.protocol.route.TopicRouteData;
+import org.apache.rocketmq.common.topic.TopicValidator;
+import org.apache.rocketmq.logging.InternalLogger;
+import org.apache.rocketmq.logging.InternalLoggerFactory;
+
+
+public class AssignmentManager {
+    private static final InternalLogger log = 
InternalLoggerFactory.getLogger(LoggerName.BROKER_LOGGER_NAME);
+
+    private transient BrokerController brokerController;
+
+    private final static long LOCK_TIMEOUT_MILLIS = 3000;
+
+    private final Lock lockNamesrv = new ReentrantLock();
+
+    private final BrokerOuterAPI mQClientAPIImpl;
+
+    private final ConcurrentHashMap<String, Set<MessageQueue>> 
topicSubscribeInfoTable = new ConcurrentHashMap<String, Set<MessageQueue>>();
+
+    private ScheduledExecutorService scheduledExecutorService = Executors
+        .newSingleThreadScheduledExecutor(new 
ThreadFactoryImpl("LoadBalanceManagerScheduledThread"));
+
+    private static final List<String> IGNORE_ROUTE_TOPICS = Lists.newArrayList(
+        TopicValidator.SYSTEM_TOPIC_PREFIX,
+        MixAll.CID_RMQ_SYS_PREFIX,
+        MixAll.DEFAULT_CONSUMER_GROUP,
+        MixAll.TOOLS_CONSUMER_GROUP,
+        MixAll.FILTERSRV_CONSUMER_GROUP,
+        MixAll.MONITOR_CONSUMER_GROUP,
+        MixAll.ONS_HTTP_PROXY_GROUP,

Review comment:
       Because it's a large commit, and Github collapse them by default.
   You should first find MixAll.java file, then click Load diff link, then you 
will find what i said.
   BTW there are many other ONS stuff constants there and being refered by 
other codes, i think if you care about them, another separate commit is 
preferred.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to