sborya commented on a change in pull request #1408:
URL: https://github.com/apache/samza/pull/1408#discussion_r467146936
##########
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 than {@link
#getConsumer}, which can be used to provide extra
+ * information 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 used 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 than {@link
#getProducer}, which can be used to provide extra
+ * information 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 used 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 than {@link #getAdmin},
which can be used to provide extra
+ * information e.g. ownership of client instance, to helper better identify
admins in logs,
+ * threads and client instances etc., along with other relevant information
like systemName
Review comment:
^^^
##########
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 than {@link
#getConsumer}, which can be used to provide extra
+ * information 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 used to provide info the consumer instance.
Review comment:
" a string to provide extra info for the consumer instance."
##########
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 than {@link
#getConsumer}, which can be used to provide extra
+ * information 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
Review comment:
nit. add '.' at the end.
##########
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 than {@link
#getConsumer}, which can be used to provide extra
+ * information 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 used 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 than {@link
#getProducer}, which can be used to provide extra
+ * information 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 used to provide info the producer instance.
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]