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

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

commit 68a6cf41817af7dd22aee5f2bcdce0f62b044901
Author: Ray Matharu <rmath...@linkedin.com>
AuthorDate: Fri Mar 8 15:09:14 2019 -0800

    SEP-19: Removing standbytasks.enabled config
    
    Author: Ray Matharu <rmath...@linkedin.com>
    
    Reviewers: Jagadish<jagad...@apache.org>
    
    Closes #946 from rmatharu/removing-standby-config
---
 samza-core/src/main/scala/org/apache/samza/config/JobConfig.scala | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/samza-core/src/main/scala/org/apache/samza/config/JobConfig.scala 
b/samza-core/src/main/scala/org/apache/samza/config/JobConfig.scala
index a84c5b8..64235cf 100644
--- a/samza-core/src/main/scala/org/apache/samza/config/JobConfig.scala
+++ b/samza-core/src/main/scala/org/apache/samza/config/JobConfig.scala
@@ -111,9 +111,8 @@ object JobConfig {
   val JOB_DIAGNOSTICS_ENABLED = "job.diagnostics.enabled"
 
   // Enables standby tasks
-  val STANDBY_TASKS_ENABLED = "job.standbytasks.enabled"
   val STANDBY_TASKS_REPLICATION_FACTOR = "job.standbytasks.replication.factor"
-  val DEFAULT_STANDBY_TASKS_REPLICATION_FACTOR = 2
+  val DEFAULT_STANDBY_TASKS_REPLICATION_FACTOR = 1
 
   // Specify DiagnosticAppender class
   val DIAGNOSTICS_APPENDER_CLASS = "job.diagnostics.appender.class"
@@ -274,7 +273,7 @@ class JobConfig(config: Config) extends 
ScalaMapConfig(config) with Logging {
     get(JobConfig.SYSTEM_STREAM_PARTITION_MAPPER_FACTORY, 
classOf[HashSystemStreamPartitionMapperFactory].getName)
   }
 
-  def getStandbyTasksEnabled = getBoolean(JobConfig.STANDBY_TASKS_ENABLED, 
false)
+  def getStandbyTasksEnabled = getStandbyTaskReplicationFactor > 1
 
   def getStandbyTaskReplicationFactor = 
getInt(JobConfig.STANDBY_TASKS_REPLICATION_FACTOR, 
JobConfig.DEFAULT_STANDBY_TASKS_REPLICATION_FACTOR)
 }

Reply via email to