You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@samza.apache.org by GitBox <gi...@apache.org> on 2019/03/27 17:30:47 UTC

[GitHub] [samza] rmatharu commented on a change in pull request #978: SAMZA-1733 : Making MetricsSnapshotReporter look for appclass then taskclass

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

 ##########
 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:
   At LI, task.class is defined to empty in the global-app-def, but app.class is not predefined. That necessitates this fix.
   
   The logic here is simple, if there is an app.class, use it. If there is none, use task.class, if there is no task.class (and no app.class), raise an exception. 
   I dont see any point in logging a warning, since we can't improve-upon/act-upon it.

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


With regards,
Apache Git Services