mgodave commented on a change in pull request #1845: Functions schema 
integration
URL: https://github.com/apache/incubator-pulsar/pull/1845#discussion_r191500978
 
 

 ##########
 File path: 
pulsar-functions/instance/src/main/java/org/apache/pulsar/functions/source/PulsarSource.java
 ##########
 @@ -34,17 +40,29 @@
 import org.apache.pulsar.io.core.Source;
 import org.jboss.util.Classes;
 
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.concurrent.TimeUnit;
-
 @Slf4j
 public class PulsarSource<T> implements Source<T> {
 
     private PulsarClient pulsarClient;
     private PulsarSourceConfig pulsarSourceConfig;
-    private Map<String, SerDe> topicToSerDeMap = new HashMap<>();
+    private Map<String, SerDe<T>> topicToSerDeMap = new HashMap<>();
+
+    private final Schema<T> emptySchema = new Schema<T>() {
 
 Review comment:
   Because of the aforementioned issue raised by @merlimat; a Consumer must be 
created with a schema so I needed something to capture the type before I added 
the individual topic/schema pairs.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to