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 #3397: Exposing more methods in Sink/Source Context
Date Tue, 22 Jan 2019 17:34:56 GMT
sijie commented on a change in pull request #3397: Exposing more methods in Sink/Source Context
URL: https://github.com/apache/pulsar/pull/3397#discussion_r249883691
 
 

 ##########
 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:
   do we need these state methods for sink?

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