shanthoosh commented on a change in pull request #978: SAMZA-1733 : Making 
MetricsSnapshotReporter look for appclass then taskclass
URL: https://github.com/apache/samza/pull/978#discussion_r269649574
 
 

 ##########
 File path: 
samza-core/src/main/scala/org/apache/samza/metrics/reporter/MetricsSnapshotReporterFactory.scala
 ##########
 @@ -45,10 +45,8 @@ class MetricsSnapshotReporterFactory extends 
MetricsReporterFactory with Logging
     val jobId = config
       .getJobId
 
-    val taskClass = config
-      .getTaskClass
-      .orElse(Option(new ApplicationConfig(config).getAppClass()))
-      .getOrElse(throw new SamzaException("No task or app class defined for 
config."))
+    val taskClass = Option(new ApplicationConfig(config).getAppClass())
 
 Review comment:
   1. I think when this gets used with low-level 
API(`StreamTask`/`AsyncStreamTask`) jobs, then `app.class` won't be defined.  
   2. Would be better to log a message at warn-level that we're falling back to 
`task.class`  when we don't find `app.class`  in config.
   3. Within LI, there's yet another configuration `task.subtask.class` where 
users specify their task implementation when using offspring-helper. In that 
case `task.class` always defaults to a specific samza-predefined-class. Would 
be better to think if that would affect any of the functionality here.

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to