kafka-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From guozh...@apache.org
Subject kafka git commit: KAFKA-3922: add constructor to AbstractStream class
Date Tue, 19 Jul 2016 17:56:25 GMT
Repository: kafka
Updated Branches:
  refs/heads/0.10.0 6ec48c1a8 -> e9a1d69ed


KAFKA-3922: add constructor to AbstractStream class

https://issues.apache.org/jira/browse/KAFKA-3922

KAFKA-3922 add copy-constructor to AbstractStream class
This copy-constructor allow to access protected variables from subclasses.

It should be used to extend KStreamImpl and KTableImpl classes by implementing a decorator
pattern.

Author: Florian Hussonnois <florian.hussonnois@gmail.com>

Reviewers: Guozhang Wang <wangguoz@gmail.com>

Closes #1581 from fhussonnois/KAFKA-3922

(cherry picked from commit b418922a3b48bef9d890abb471908ab2a8aeba18)
Signed-off-by: Guozhang Wang <wangguoz@gmail.com>


Project: http://git-wip-us.apache.org/repos/asf/kafka/repo
Commit: http://git-wip-us.apache.org/repos/asf/kafka/commit/e9a1d69e
Tree: http://git-wip-us.apache.org/repos/asf/kafka/tree/e9a1d69e
Diff: http://git-wip-us.apache.org/repos/asf/kafka/diff/e9a1d69e

Branch: refs/heads/0.10.0
Commit: e9a1d69edd8302b584e9b6c813807a1a5447f2be
Parents: 6ec48c1
Author: Florian Hussonnois <florian.hussonnois@gmail.com>
Authored: Tue Jul 19 10:56:12 2016 -0700
Committer: Guozhang Wang <wangguoz@gmail.com>
Committed: Tue Jul 19 10:56:20 2016 -0700

----------------------------------------------------------------------
 .../apache/kafka/streams/kstream/internals/AbstractStream.java | 6 ++++++
 1 file changed, 6 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kafka/blob/e9a1d69e/streams/src/main/java/org/apache/kafka/streams/kstream/internals/AbstractStream.java
----------------------------------------------------------------------
diff --git a/streams/src/main/java/org/apache/kafka/streams/kstream/internals/AbstractStream.java
b/streams/src/main/java/org/apache/kafka/streams/kstream/internals/AbstractStream.java
index ebada92..3b957ab 100644
--- a/streams/src/main/java/org/apache/kafka/streams/kstream/internals/AbstractStream.java
+++ b/streams/src/main/java/org/apache/kafka/streams/kstream/internals/AbstractStream.java
@@ -30,6 +30,12 @@ public abstract class AbstractStream<K> {
     protected final String name;
     protected final Set<String> sourceNodes;
 
+    public AbstractStream(AbstractStream<K> stream) {
+        this.topology = stream.topology;
+        this.name = stream.name;
+        this.sourceNodes = stream.sourceNodes;
+    }
+
     public AbstractStream(KStreamBuilder topology, String name, Set<String> sourceNodes)
{
         this.topology = topology;
         this.name = name;


Mime
View raw message