srkukarni 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_r217554182
##########
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:
this should be false
----------------------------------------------------------------
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