pulsar-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] sijie commented on a change in pull request #2570: Fix BC issue in functions trigger function submitted by old CLI
Date Fri, 14 Sep 2018 00:12:50 GMT
sijie commented on a change in pull request #2570: Fix BC issue in functions trigger function
submitted by old CLI
URL: https://github.com/apache/incubator-pulsar/pull/2570#discussion_r217570601
 
 

 ##########
 File path: pulsar-functions/worker/src/main/java/org/apache/pulsar/functions/worker/FunctionMetaDataManager.java
 ##########
 @@ -111,6 +114,26 @@ public void initialize() {
         }
     }
 
+    static FunctionMetaData normalizeFunctionMetaData(FunctionMetaData fmd) {
+        if (!fmd.getFunctionDetails().getSource().getTopicsToSerDeClassNameMap().isEmpty())
{
+            FunctionDetails.Builder fdb = FunctionDetails.newBuilder(fmd.getFunctionDetails());
+            for (Map.Entry<String, String> topicEntry : fmd.getFunctionDetails().getSource().getTopicsToSerDeClassNameMap().entrySet())
{
+                fdb.getSourceBuilder().putInputSpecs(
+                    topicEntry.getKey(),
+                    ConsumerSpec.newBuilder()
+                        .setSerdeClassName(topicEntry.getValue())
+                        .setIsRegexPattern(topicEntry.getKey() == fmd.getFunctionDetails().getSource().getTopicsPattern())
 
 Review comment:
   why? if topic patterns was used, this should be true, no?

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message