kafka-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From guozh...@apache.org
Subject [kafka] branch trunk updated: KAFKA-7027: Add overloaded build method to StreamsBuilder (#5437)
Date Tue, 31 Jul 2018 16:24:20 GMT
This is an automated email from the ASF dual-hosted git repository.

guozhang pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/kafka.git


The following commit(s) were added to refs/heads/trunk by this push:
     new e09d6d7  KAFKA-7027: Add overloaded build method to StreamsBuilder (#5437)
e09d6d7 is described below

commit e09d6d796f5a0b840519021d7f6435c65f88a60a
Author: Bill Bejeck <bbejeck@gmail.com>
AuthorDate: Tue Jul 31 12:24:13 2018 -0400

    KAFKA-7027: Add overloaded build method to StreamsBuilder (#5437)
    
    Reviewers: Guozhang Wang <wangguoz@gmail.com>
---
 .../main/java/org/apache/kafka/streams/StreamsBuilder.java | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/streams/src/main/java/org/apache/kafka/streams/StreamsBuilder.java b/streams/src/main/java/org/apache/kafka/streams/StreamsBuilder.java
index ae6d44c..ba74f61 100644
--- a/streams/src/main/java/org/apache/kafka/streams/StreamsBuilder.java
+++ b/streams/src/main/java/org/apache/kafka/streams/StreamsBuilder.java
@@ -41,6 +41,7 @@ import org.apache.kafka.streams.state.StoreBuilder;
 import java.util.Collection;
 import java.util.Collections;
 import java.util.Objects;
+import java.util.Properties;
 import java.util.regex.Pattern;
 
 /**
@@ -513,10 +514,23 @@ public class StreamsBuilder {
 
     /**
      * Returns the {@link Topology} that represents the specified processing logic.
+     * Note that using this method means no optimizations are performed.
      *
      * @return the {@link Topology} that represents the specified processing logic
      */
     public synchronized Topology build() {
+        return build(null);
+    }
+
+    /**
+     * Returns the {@link Topology} that represents the specified processing logic and accepts
+     * a {@link Properties} instance used to indicate whether to optimize topology or not.
+     *
+     * @param props the {@link Properties} used for building possibly optimized topology
+     * @return the {@link Topology} that represents the specified processing logic
+     */
+    public synchronized Topology build(final Properties props) {
+        // the props instance will be used once optimization framework merged
         return topology;
     }
 }


Mime
View raw message