You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2019/01/07 01:04:36 UTC

[GitHub] jerrypeng commented on a change in pull request #3315: Clean up and correct properties to producer and consumers created by Functions/Sinks/Sources

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_r245531475
 
 

 ##########
 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:
   we could have separate fields for tenant, namespace, and name.  What do you think?

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