-
Notifications
You must be signed in to change notification settings - Fork 28.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SPARK-2083 Add support for spark.local.maxFailures configuration property #1465
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1463,12 +1463,13 @@ object SparkContext extends Logging { | |
// Regular expression for connection to Simr cluster | ||
val SIMR_REGEX = """simr://(.*)""".r | ||
|
||
// When running locally, don't try to re-execute tasks on failure. | ||
// When running locally, by default don't try to re-execute tasks on failure. | ||
val MAX_LOCAL_TASK_FAILURES = 1 | ||
|
||
master match { | ||
case "local" => | ||
val scheduler = new TaskSchedulerImpl(sc, MAX_LOCAL_TASK_FAILURES, isLocal = true) | ||
val localTaskFailures = sc.conf.getInt("spark.local.maxFailures", MAX_LOCAL_TASK_FAILURES) | ||
val scheduler = new TaskSchedulerImpl(sc, localTaskFailures, isLocal = true) | ||
val backend = new LocalBackend(scheduler, 1) | ||
scheduler.initialize(backend) | ||
scheduler | ||
|
@@ -1477,7 +1478,8 @@ object SparkContext extends Logging { | |
def localCpuCount = Runtime.getRuntime.availableProcessors() | ||
// local[*] estimates the number of cores on the machine; local[N] uses exactly N threads. | ||
val threadCount = if (threads == "*") localCpuCount else threads.toInt | ||
val scheduler = new TaskSchedulerImpl(sc, MAX_LOCAL_TASK_FAILURES, isLocal = true) | ||
val localTaskFailures = sc.conf.getInt("spark.local.maxFailures", MAX_LOCAL_TASK_FAILURES) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. here too There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Will do. |
||
val scheduler = new TaskSchedulerImpl(sc, localTaskFailures, isLocal = true) | ||
val backend = new LocalBackend(scheduler, threadCount) | ||
scheduler.initialize(backend) | ||
scheduler | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -599,6 +599,15 @@ Apart from these, the following properties are also available, and may be useful | |
<td> | ||
Number of individual task failures before giving up on the job. | ||
Should be greater than or equal to 1. Number of allowed retries = this value - 1. | ||
Does not apply to running Spark locally. | ||
</td> | ||
</tr> | ||
<tr> | ||
<td><code>spark.local.maxFailures</code></td> | ||
<td>1</td> | ||
<td> | ||
Number of individual task failures before giving up on the job, when running Spark locally. | ||
Should be greater than or equal to 1. No retries are allowed. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. "No retries are allowed." ? What does this mean? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah, that's an error. It should say "Number of allowed retries is this value - 1." Will fix. |
||
</td> | ||
</tr> | ||
<tr> | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i'd rename the variable maxTaskFailures
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will do.