anton-vinogradov commented on a change in pull request #49:
URL: https://github.com/apache/ignite-extensions/pull/49#discussion_r650724395



##########
File path: 
modules/cdc-ext/src/main/java/org/apache/ignite/cdc/kafka/KafkaToIgniteCdcStreamerConfiguration.java
##########
@@ -0,0 +1,112 @@
+/*
+ * 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.ignite.cdc.kafka;
+
+import java.util.Collection;
+import java.util.Map;
+import org.apache.ignite.internal.processors.cache.IgniteInternalCache;
+
+/**
+ * Configuration of {@link KafkaToIgniteCdcStreamer} application.
+ *
+ * @see KafkaToIgniteCdcStreamer
+ * @see KafkaToIgniteLoader
+ */
+public class KafkaToIgniteCdcStreamerConfiguration {
+    /** Default {@link #kafkaParts} value. */
+    public static final int DFLT_PARTS = 16;
+
+    /** Default {@link #topic} value. */
+    public static final String DFLT_TOPIC = "ignite";
+
+    /** Default {@link #maxBatchSize} value. */
+    public static final int DFLT_MAX_BATCH_SIZE = 1024;
+
+    /** {@link Applier} thread count. */
+    private int threadCnt = DFLT_PARTS;
+
+    /** Topic name. */
+    private String topic = DFLT_TOPIC;
+
+    /** Kafka partitions count. */
+    private int kafkaParts = DFLT_PARTS;

Review comment:
       The current logic is not clear to me.
   Having `threadCnt` and `kafkaParts` simultaneously with subsequent 
calculation `partPerApplier = kafkaParts / threadCnt` may set N partitions to 
some Appliers, but N+1 to other, that's not what user may expect.
   We must simplify this to `kafkaParts` and `partPerApplier`.




-- 
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