sborya commented on a change in pull request #1408:
URL: https://github.com/apache/samza/pull/1408#discussion_r469417160



##########
File path: samza-api/src/main/java/org/apache/samza/system/SystemFactory.java
##########
@@ -27,9 +27,56 @@
  * a particular system, as well as the accompanying {@link 
org.apache.samza.system.SystemAdmin}.
  */
 public interface SystemFactory {
+  @Deprecated
   SystemConsumer getConsumer(String systemName, Config config, MetricsRegistry 
registry);
 
+  @Deprecated
   SystemProducer getProducer(String systemName, Config config, MetricsRegistry 
registry);
 
+  @Deprecated
   SystemAdmin getAdmin(String systemName, Config config);
+
+  /**
+   * This function provides an extra input parameter to {@link #getConsumer}, 
which can be used to provide extra
+   * information for the consumer instance, e.g. ownership of client instance, 
to helper better identify consumers in logs,

Review comment:
       s/helper/help

##########
File path: samza-api/src/main/java/org/apache/samza/system/SystemFactory.java
##########
@@ -27,9 +27,56 @@
  * a particular system, as well as the accompanying {@link 
org.apache.samza.system.SystemAdmin}.
  */
 public interface SystemFactory {
+  @Deprecated
   SystemConsumer getConsumer(String systemName, Config config, MetricsRegistry 
registry);
 
+  @Deprecated
   SystemProducer getProducer(String systemName, Config config, MetricsRegistry 
registry);
 
+  @Deprecated
   SystemAdmin getAdmin(String systemName, Config config);
+
+  /**
+   * This function provides an extra input parameter to {@link #getConsumer}, 
which can be used to provide extra
+   * information for the consumer instance, e.g. ownership of client instance, 
to helper better identify consumers in logs,
+   * threads and client instances etc., along with other relevant information 
like systemName.
+   *
+   * @param systemName The name of the system to create consumer for.
+   * @param config The config to create consumer with.
+   * @param registry MetricsRegistry to which to publish consumer specific 
metrics.
+   * @param consumerLabel a string to provide info the consumer instance.
+   * @return A SystemConsumer
+   */
+  default SystemConsumer getConsumer(String systemName, Config config, 
MetricsRegistry registry, String consumerLabel) {
+    return getConsumer(systemName, config, registry);
+  }
+
+  /**
+   * This function provides an extra input parameter to {@link #getProducer}, 
which can be used to provide extra
+   * information for the producer instance, e.g. ownership of client instance, 
to helper better identify producers in logs,

Review comment:
       see above.

##########
File path: samza-api/src/main/java/org/apache/samza/system/SystemFactory.java
##########
@@ -27,9 +27,56 @@
  * a particular system, as well as the accompanying {@link 
org.apache.samza.system.SystemAdmin}.
  */
 public interface SystemFactory {
+  @Deprecated
   SystemConsumer getConsumer(String systemName, Config config, MetricsRegistry 
registry);
 
+  @Deprecated
   SystemProducer getProducer(String systemName, Config config, MetricsRegistry 
registry);
 
+  @Deprecated
   SystemAdmin getAdmin(String systemName, Config config);
+
+  /**
+   * This function provides an extra input parameter to {@link #getConsumer}, 
which can be used to provide extra
+   * information for the consumer instance, e.g. ownership of client instance, 
to helper better identify consumers in logs,
+   * threads and client instances etc., along with other relevant information 
like systemName.
+   *
+   * @param systemName The name of the system to create consumer for.
+   * @param config The config to create consumer with.
+   * @param registry MetricsRegistry to which to publish consumer specific 
metrics.
+   * @param consumerLabel a string to provide info the consumer instance.
+   * @return A SystemConsumer
+   */
+  default SystemConsumer getConsumer(String systemName, Config config, 
MetricsRegistry registry, String consumerLabel) {
+    return getConsumer(systemName, config, registry);
+  }
+
+  /**
+   * This function provides an extra input parameter to {@link #getProducer}, 
which can be used to provide extra
+   * information for the producer instance, e.g. ownership of client instance, 
to helper better identify producers in logs,
+   * threads and client instances etc., along with other relevant information 
like systemName.
+   *
+   * @param systemName The name of the system to create producer for.
+   * @param config The config to create producer with.
+   * @param registry MetricsRegistry to which to publish producer specific 
metrics.
+   * @param producerLabel a string to provide info the producer instance.
+   * @return A SystemProducer
+   */
+  default SystemProducer getProducer(String systemName, Config config, 
MetricsRegistry registry, String producerLabel) {
+    return getProducer(systemName, config, registry);
+  }
+
+  /**
+   * This function provides an extra input parameter to {@link #getAdmin}, 
which can be used to provide extra
+   * information for the admin instance, e.g. ownership of client instance, to 
helper better identify admins in logs,

Review comment:
       see above.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to