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/22 20:34:00 UTC

[GitHub] srkukarni commented on a change in pull request #3397: Exposing more methods in Sink/Source Context

srkukarni commented on a change in pull request #3397: Exposing more methods in Sink/Source Context
URL: https://github.com/apache/pulsar/pull/3397#discussion_r249949480
 
 

 ##########
 File path: pulsar-io/core/src/main/java/org/apache/pulsar/io/core/SinkContext.java
 ##########
 @@ -40,4 +45,66 @@
      * @param value The value of the metric
      */
     void recordMetric(String metricName, double value);
+
+    /**
+     * Get a list of all input topics
+     * @return a list of all input topics
+     */
+    Collection<String> getInputTopics();
+
+    /**
+     * The tenant this sink belongs to
+     * @return the tenant this sink belongs to
+     */
+    String getTenant();
+
+    /**
+     * The namespace this sink belongs to
+     * @return the namespace this sink belongs to
+     */
+    String getNamespace();
+
+    /**
+     * The name of the sink that we are executing
+     * @return The Sink name
+     */
+    String getSinkName();
+
+    /**
+     * The logger object that can be used to log in a sink
+     * @return the logger object
+     */
+    Logger getLogger();
+    
+    /**
+     * Increment the builtin distributed counter refered by key
+     * @param key The name of the key
+     * @param amount The amount to be incremented
+     */
+    void incrCounter(String key, long amount);
 
 Review comment:
   I'm tending towards @sijie for this one. Not sure we really need this for sources/sinks

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