You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@samza.apache.org by at...@apache.org on 2019/03/27 18:50:42 UTC

[samza] branch master updated: SAMZA-1733 : Making MetricsSnapshotReporter look for appclass then taskclass (#978)

This is an automated email from the ASF dual-hosted git repository.

atoomula pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/samza.git


The following commit(s) were added to refs/heads/master by this push:
     new 0000dfc  SAMZA-1733 : Making MetricsSnapshotReporter look for appclass then taskclass (#978)
0000dfc is described below

commit 0000dfc93457dfb7973947ec0b27be6bee42057e
Author: rmatharu <40...@users.noreply.github.com>
AuthorDate: Wed Mar 27 11:50:34 2019 -0700

    SAMZA-1733 : Making MetricsSnapshotReporter look for appclass then taskclass (#978)
    
    * Rocksdb bug fix
    
    * Removing standbytasks.enabled config
    
    * Revert "Removing standbytasks.enabled config"
    
    This reverts commit 719126a063f4eb47cc2827e79efbd96a9cdda274.
    
    * Making MetricsSnapshotReporter look for appclass before taskclass
---
 .../samza/metrics/reporter/MetricsSnapshotReporterFactory.scala     | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/samza-core/src/main/scala/org/apache/samza/metrics/reporter/MetricsSnapshotReporterFactory.scala b/samza-core/src/main/scala/org/apache/samza/metrics/reporter/MetricsSnapshotReporterFactory.scala
index 132a903..041c5c8 100644
--- a/samza-core/src/main/scala/org/apache/samza/metrics/reporter/MetricsSnapshotReporterFactory.scala
+++ b/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())
+      .getOrElse(config.getTaskClass.getOrElse(throw new SamzaException("No task or app class defined for config.")))
 
     val version = Option(Class.forName(taskClass).getPackage.getImplementationVersion)
       .getOrElse({