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_r249885941
 
 

 ##########
 File path: pulsar-io/core/src/main/java/org/apache/pulsar/io/core/SourceContext.java
 ##########
 @@ -40,4 +44,65 @@
      * @param value The value of the metric
      */
     void recordMetric(String metricName, double value);
+
+    /**
+     * Get the output topic of the source
+     * @return output topic name
+     */
+    String getOutputTopic();
+
+    /**
+     * The tenant this source belongs to
+     * @return the tenant this source belongs to
+     */
+    String getTenant();
+
+    /**
+     * The namespace this source belongs to
+     * @return the namespace this source belongs to
+     */
+    String getNamespace();
+
+    /**
+     * The name of the source that we are executing
+     * @return The Source name
+     */
+    String getSourceName();
+
+    /**
+     * The logger object that can be used to log in a source
+     * @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:
   same comment as above

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