You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ignite.apache.org by GitBox <gi...@apache.org> on 2022/03/05 14:55:25 UTC

[GitHub] [ignite-extensions] ololo3000 commented on a change in pull request #100: IGNITE-16664 IgniteToIgniteCdcStreamer named parameters added

ololo3000 commented on a change in pull request #100:
URL: https://github.com/apache/ignite-extensions/pull/100#discussion_r820112767



##########
File path: modules/cdc-ext/src/test/java/org/apache/ignite/cdc/CdcIgniteToIgniteReplicationTest.java
##########
@@ -69,7 +69,10 @@
         return runAsync(() -> {
             CdcConfiguration cdcCfg = new CdcConfiguration();
 
-            cdcCfg.setConsumer(new IgniteToIgniteCdcStreamer(destCfg, false, Collections.singleton(cache), KEYS_CNT));
+            cdcCfg.setConsumer(new IgniteToIgniteCdcStreamer()
+                .setMaxBatchSize(KEYS_CNT)
+                .setDestinationIgniteConfiguration(destCfg)
+                .setCaches(Collections.singleton(cache)));

Review comment:
       New line is missing.

##########
File path: modules/cdc-ext/src/main/java/org/apache/ignite/cdc/IgniteToIgniteCdcStreamer.java
##########
@@ -153,4 +157,51 @@ public IgniteToIgniteCdcStreamer(IgniteConfiguration destIgniteCfg, boolean only
     @Override protected IgniteLogger log() {
         return log;
     }
+
+    /**
+     * Sets Ignite client node configuration thats will connect to destination cluster.
+     * @param destIgniteCfg Ignite client node configuration thats will connect to destination cluster.
+     * @return {@code this} for chaining.
+     */
+    public IgniteToIgniteCdcStreamer setDestinationIgniteConfiguration(IgniteConfiguration destIgniteCfg) {
+        this.destIgniteCfg = destIgniteCfg;
+
+        return this;
+    }
+
+    /**
+     * Sets whether entries only from primary nodes should be handled.
+     *
+     * @param onlyPrimary Kafka whether entries only from primary nodes should be handled.
+     * @return {@code this} for chaining.
+     */
+    public IgniteToIgniteCdcStreamer setOnlyPrimary(boolean onlyPrimary) {
+        this.onlyPrimary = onlyPrimary;
+
+        return this;
+    }
+
+    /**
+     * Sets cache names that participate in CDC.
+     *
+     * @param caches Cache names.
+     * @return {@code this} for chaining.
+     */
+    public IgniteToIgniteCdcStreamer setCaches(Set<String> caches) {
+        this.caches = caches;
+
+        return this;
+    }
+
+    /**
+     * Sets maximum batch size that will be applied to destination cluster..

Review comment:
       Extra dot at the end.

##########
File path: modules/cdc-ext/src/main/java/org/apache/ignite/cdc/IgniteToIgniteCdcStreamer.java
##########
@@ -153,4 +157,51 @@ public IgniteToIgniteCdcStreamer(IgniteConfiguration destIgniteCfg, boolean only
     @Override protected IgniteLogger log() {
         return log;
     }
+
+    /**
+     * Sets Ignite client node configuration thats will connect to destination cluster.
+     * @param destIgniteCfg Ignite client node configuration thats will connect to destination cluster.
+     * @return {@code this} for chaining.
+     */
+    public IgniteToIgniteCdcStreamer setDestinationIgniteConfiguration(IgniteConfiguration destIgniteCfg) {
+        this.destIgniteCfg = destIgniteCfg;
+
+        return this;
+    }
+
+    /**
+     * Sets whether entries only from primary nodes should be handled.
+     *
+     * @param onlyPrimary Kafka whether entries only from primary nodes should be handled.

Review comment:
       The word  "Kafka" is redundant.




-- 
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: notifications-unsubscribe@ignite.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org