Slideee commented on code in PR #117:
URL: https://github.com/apache/rocketmq-connect/pull/117#discussion_r867377167
##########
connectors/rocketmq-replicator/src/main/java/org/apache/rocketmq/replicator/strategy/DivideTaskByTopic.java:
##########
@@ -28,10 +28,12 @@
public class DivideTaskByTopic extends TaskDivideStrategy {
- @Override public List<KeyValue> divide(Map<String, Set<TaskTopicInfo>>
topicRouteMap, TaskDivideConfig tdc) {
+ @Override
+ public List<KeyValue> divide(Map<String, Set<TaskTopicInfo>>
topicRouteMap, TaskDivideConfig tdc,
+ int maxTasks) {
List<KeyValue> config = new ArrayList<KeyValue>();
- int parallelism = tdc.getTaskParallelism();
+ int parallelism = Math.min(tdc.getTaskParallelism(), maxTasks);
Review Comment:
> ```
> 1、may be ConfigDefine.CONN_TASK_PARALLELISM should deprecate
> ```
>
> this.taskParallelism = config.getInt(ConfigDefine.CONN_TASK_PARALLELISM,
1); 2、if devide by topic int parallelism = Math.min(topicNum, maxTasks);
as you mean
if divide by queue, int parallelism = Math.min(queueNum, maxTasks)
if divide by group, int parallelism = Math.min(groupNum, maxTasks)
Is that right?
then the number of hash nodes is still compared with taskParallelism and
maxTasks?
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]