pulsar-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] jerrypeng commented on a change in pull request #3315: Clean up and correct properties to producer and consumers created by Functions/Sinks/Sources
Date Mon, 07 Jan 2019 19:04:59 GMT
jerrypeng commented on a change in pull request #3315: Clean up and correct properties to producer
and consumers created by Functions/Sinks/Sources
URL: https://github.com/apache/pulsar/pull/3315#discussion_r245763384
 
 

 ##########
 File path: pulsar-functions/instance/src/main/java/org/apache/pulsar/functions/instance/InstanceUtils.java
 ##########
 @@ -103,4 +106,21 @@
         }
         return SINK;
     }
+
+    public static Map<String, String> getProperties(Utils.ComponentType componentType,
String fullyQualifiedInstanceId) {
+        Map<String, String> properties = new HashMap<>();
+        switch (componentType) {
+            case FUNCTION:
+                properties.put("application", "pulsar-function");
+                break;
+            case SOURCE:
+                properties.put("application", "pulsar-source");
+                break;
+            case SINK:
+                properties.put("application", "pulsar-sink");
+                break;
+        }
+        properties.put("id", fullyQualifiedInstanceId);
 
 Review comment:
   @cckellogg sounds good. I have updated the PR

----------------------------------------------------------------
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