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



##########
File path: samza-api/src/main/java/org/apache/samza/system/SystemFactory.java
##########
@@ -32,4 +32,16 @@
   SystemProducer getProducer(String systemName, Config config, MetricsRegistry 
registry);
 
   SystemAdmin getAdmin(String systemName, Config config);
+
+  default SystemConsumer getConsumer(String systemName, Config config, 
MetricsRegistry registry, String consumerIdPrefix) {

Review comment:
       I think we don't want caller to assume that this is the id and it must 
be used as is. The idea is that it should be a unique piece of info that can be 
used to construct an id. Please suggest your name.

##########
File path: samza-core/src/main/java/org/apache/samza/util/DiagnosticsUtil.java
##########
@@ -144,7 +145,8 @@ public MetadataFileContents(String version, String 
metricsSnapshot) {
       }
       SystemFactory systemFactory = 
ReflectionUtil.getObj(diagnosticsSystemFactoryName.get(), SystemFactory.class);
       SystemProducer systemProducer =
-          systemFactory.getProducer(diagnosticsSystemStream.getSystem(), 
config, new MetricsRegistryMap());
+          systemFactory.getProducer(diagnosticsSystemStream.getSystem(), 
config, new MetricsRegistryMap(),
+              MethodHandles.lookup().lookupClass().getSimpleName());

Review comment:
       I think it is a static method. And we CAN use simpleName(), but we don't 
have too. As long as it is unique for the caller.




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