Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@ private[spark] class TaskSchedulerImpl(
// How often to check for speculative tasks
val SPECULATION_INTERVAL_MS = conf.getTimeAsMs("spark.speculation.interval", "100ms")

val SNAPPY_WRITE_RETRY_PROP = "snappydata.maxRetryAttemptsForWrite"

// Duplicate copies of a task will only be launched if the original copy has been running for
// at least this amount of time. This is to avoid the overhead of launching speculative copies
// of tasks that are very short.
Expand Down Expand Up @@ -194,7 +196,18 @@ private[spark] class TaskSchedulerImpl(
val tasks = taskSet.tasks
logInfo("Adding task set " + taskSet.id + " with " + tasks.length + " tasks")
this.synchronized {
val manager = createTaskSetManager(taskSet, maxTaskFailures)
val maxRetryAttemptsForWrite = taskSet.properties.
getProperty(SNAPPY_WRITE_RETRY_PROP)

logInfo("The maxRetryAttemptsForWrite is set to " + maxRetryAttemptsForWrite +
"maxTaskFailure " + maxTaskFailures)
val maxRetryAttempts = if (maxRetryAttemptsForWrite != null) {
maxRetryAttemptsForWrite.toInt
} else {
maxTaskFailures
}

val manager = createTaskSetManager(taskSet, maxRetryAttempts)
val stage = taskSet.stageId
val stageTaskSets =
taskSetsByStageIdAndAttempt.getOrElseUpdate(stage, new HashMap[Int, TaskSetManager])
Expand Down