kafka-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From guozh...@apache.org
Subject kafka git commit: MINOR: remove unused fields from KTableImpl
Date Wed, 09 Nov 2016 19:17:42 GMT
Repository: kafka
Updated Branches:
  refs/heads/trunk 7c36fc377 -> f1e1b6e74


MINOR: remove unused fields from KTableImpl

Remove `keySerde`, `valSerde`, `OUTERTHIS_NAME`, `OUTEROTHER_NAME`, `LEFTTHIS_NAME`, `LEFTOTHER_NAME`
from `KTableImpl` as they are all unused fields

Author: Damian Guy <damian.guy@gmail.com>

Reviewers: Guozhang Wang <wangguoz@gmail.com>

Closes #2119 from dguy/minor-ktable-unused


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

Branch: refs/heads/trunk
Commit: f1e1b6e744cde036d75678575bd5e32c608ecdb1
Parents: 7c36fc3
Author: Damian Guy <damian.guy@gmail.com>
Authored: Wed Nov 9 11:17:37 2016 -0800
Committer: Guozhang Wang <wangguoz@gmail.com>
Committed: Wed Nov 9 11:17:37 2016 -0800

----------------------------------------------------------------------
 .../kafka/streams/kstream/KStreamBuilder.java   |  2 +-
 .../streams/kstream/internals/KTableImpl.java   | 22 --------------------
 2 files changed, 1 insertion(+), 23 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kafka/blob/f1e1b6e7/streams/src/main/java/org/apache/kafka/streams/kstream/KStreamBuilder.java
----------------------------------------------------------------------
diff --git a/streams/src/main/java/org/apache/kafka/streams/kstream/KStreamBuilder.java b/streams/src/main/java/org/apache/kafka/streams/kstream/KStreamBuilder.java
index 38d126e..33085c9 100644
--- a/streams/src/main/java/org/apache/kafka/streams/kstream/KStreamBuilder.java
+++ b/streams/src/main/java/org/apache/kafka/streams/kstream/KStreamBuilder.java
@@ -152,7 +152,7 @@ public class KStreamBuilder extends TopologyBuilder {
         addSource(source, keySerde == null ? null : keySerde.deserializer(), valSerde ==
null ? null : valSerde.deserializer(), topic);
         addProcessor(name, processorSupplier, source);
 
-        final KTableImpl kTable = new KTableImpl<>(this, name, processorSupplier, Collections.singleton(source),
keySerde, valSerde, storeName);
+        final KTableImpl kTable = new KTableImpl<>(this, name, processorSupplier, Collections.singleton(source),
storeName);
         StateStoreSupplier storeSupplier = new RocksDBKeyValueStoreSupplier<>(storeName,
             keySerde,
             valSerde,

http://git-wip-us.apache.org/repos/asf/kafka/blob/f1e1b6e7/streams/src/main/java/org/apache/kafka/streams/kstream/internals/KTableImpl.java
----------------------------------------------------------------------
diff --git a/streams/src/main/java/org/apache/kafka/streams/kstream/internals/KTableImpl.java
b/streams/src/main/java/org/apache/kafka/streams/kstream/internals/KTableImpl.java
index cd83d50..06f5945 100644
--- a/streams/src/main/java/org/apache/kafka/streams/kstream/internals/KTableImpl.java
+++ b/streams/src/main/java/org/apache/kafka/streams/kstream/internals/KTableImpl.java
@@ -55,18 +55,10 @@ public class KTableImpl<K, S, V> extends AbstractStream<K>
implements KTable<K,
 
     public static final String JOINOTHER_NAME = "KTABLE-JOINOTHER-";
 
-    public static final String LEFTTHIS_NAME = "KTABLE-LEFTTHIS-";
-
-    public static final String LEFTOTHER_NAME = "KTABLE-LEFTOTHER-";
-
     private static final String MAPVALUES_NAME = "KTABLE-MAPVALUES-";
 
     public static final String MERGE_NAME = "KTABLE-MERGE-";
 
-    public static final String OUTERTHIS_NAME = "KTABLE-OUTERTHIS-";
-
-    public static final String OUTEROTHER_NAME = "KTABLE-OUTEROTHER-";
-
     private static final String PRINTING_NAME = "KSTREAM-PRINTER-";
 
     private static final String SELECT_NAME = "KTABLE-SELECT-";
@@ -77,8 +69,6 @@ public class KTableImpl<K, S, V> extends AbstractStream<K> implements
KTable<K,
 
     public final ProcessorSupplier<?, ?> processorSupplier;
 
-    private final Serde<K> keySerde;
-    private final Serde<V> valSerde;
     private final String storeName;
 
     private boolean sendOldValues = false;
@@ -89,20 +79,8 @@ public class KTableImpl<K, S, V> extends AbstractStream<K>
implements KTable<K,
                       ProcessorSupplier<?, ?> processorSupplier,
                       Set<String> sourceNodes,
                       final String storeName) {
-        this(topology, name, processorSupplier, sourceNodes, null, null, storeName);
-    }
-
-    public KTableImpl(KStreamBuilder topology,
-                      String name,
-                      ProcessorSupplier<?, ?> processorSupplier,
-                      Set<String> sourceNodes,
-                      Serde<K> keySerde,
-                      Serde<V> valSerde,
-                      final String storeName) {
         super(topology, name, sourceNodes);
         this.processorSupplier = processorSupplier;
-        this.keySerde = keySerde;
-        this.valSerde = valSerde;
         this.storeName = storeName;
     }
 


Mime
View raw message