Skip to content

[SPARK-1749] Job cancellation when SchedulerBackend does not implement killTask - #1219

Closed
kayousterhout wants to merge 6 commits into
apache:masterfrom
kayousterhout:mark-SPARK-1749
Closed

kayousterhout wants to merge 6 commits into
apache:masterfrom
kayousterhout:mark-SPARK-1749

Conversation

@kayousterhout

Copy link
Copy Markdown
Contributor

This is a fixed up version of #686 (cc @markhamstra @pwendell). The last commit (the only one I authored) reflects the changes I made from Mark's original patch.

@AmplabJenkins

Copy link
Copy Markdown

Merged build triggered.

@AmplabJenkins

Copy link
Copy Markdown

Merged build started.

@kayousterhout

Copy link
Copy Markdown
Contributor Author

Yeah great point fixed

@AmplabJenkins

Copy link
Copy Markdown

Merged build triggered.

@AmplabJenkins

Copy link
Copy Markdown

Merged build started.

@AmplabJenkins

Copy link
Copy Markdown

Merged build finished. All automated tests passed.

@AmplabJenkins

Copy link
Copy Markdown

Merged build finished.

@AmplabJenkins

Copy link
Copy Markdown

All automated tests passed.
Refer to this link for build results: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/16128/

@AmplabJenkins

Copy link
Copy Markdown

Refer to this link for build results: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/16127/

@pwendell

Copy link
Copy Markdown
Contributor

Jenkins, retest this please.

@AmplabJenkins

Copy link
Copy Markdown

Merged build triggered.

@AmplabJenkins

Copy link
Copy Markdown

Merged build started.

@AmplabJenkins

Copy link
Copy Markdown

Merged build finished. All automated tests passed.

@AmplabJenkins

Copy link
Copy Markdown

All automated tests passed.
Refer to this link for build results: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/16134/

@pwendell

Copy link
Copy Markdown
Contributor

Thanks Mark and Kay. I've merged this!

@asfgit asfgit closed this in b88a59a Jun 26, 2014
asfgit pushed a commit that referenced this pull request Jun 26, 2014
…t killTask

This is a fixed up version of #686 (cc @markhamstra @pwendell).  The last commit (the only one I authored) reflects the changes I made from Mark's original patch.

Author: Mark Hamstra <markhamstra@gmail.com>
Author: Kay Ousterhout <kayousterhout@gmail.com>

Closes #1219 from kayousterhout/mark-SPARK-1749 and squashes the following commits:

42dfa7e [Kay Ousterhout] Got rid of terrible double-negative name
80b3205 [Kay Ousterhout] Don't notify listeners of job failure if it wasn't successfully cancelled.
d156d33 [Mark Hamstra] Do nothing in no-kill submitTasks
9312baa [Mark Hamstra] code review update
cc353c8 [Mark Hamstra] scalastyle
e61f7f8 [Mark Hamstra] Catch UnsupportedOperationException when DAGScheduler tries to cancel a job on a SchedulerBackend that does not implement killTask
(cherry picked from commit b88a59a)

Signed-off-by: Patrick Wendell <pwendell@gmail.com>
@berngp

berngp commented Jun 26, 2014

Copy link
Copy Markdown
Contributor

Thank you, this is fantastic.

@kayousterhout
kayousterhout deleted the mark-SPARK-1749 branch June 26, 2014 18:10
xiliu82 pushed a commit to xiliu82/spark that referenced this pull request Sep 4, 2014
…t killTask

This is a fixed up version of apache#686 (cc @markhamstra @pwendell).  The last commit (the only one I authored) reflects the changes I made from Mark's original patch.

Author: Mark Hamstra <markhamstra@gmail.com>
Author: Kay Ousterhout <kayousterhout@gmail.com>

Closes apache#1219 from kayousterhout/mark-SPARK-1749 and squashes the following commits:

42dfa7e [Kay Ousterhout] Got rid of terrible double-negative name
80b3205 [Kay Ousterhout] Don't notify listeners of job failure if it wasn't successfully cancelled.
d156d33 [Mark Hamstra] Do nothing in no-kill submitTasks
9312baa [Mark Hamstra] code review update
cc353c8 [Mark Hamstra] scalastyle
e61f7f8 [Mark Hamstra] Catch UnsupportedOperationException when DAGScheduler tries to cancel a job on a SchedulerBackend that does not implement killTask
wangyum pushed a commit that referenced this pull request May 26, 2023
github-actions Bot pushed a commit to MaxGekk/spark that referenced this pull request Oct 30, 2026
apache#1219)

### What changes were proposed in this pull request?

This PR adds one implementation plan, `sql/varka/plans/m8/VARKA-356.md`, for three rows of Spark's math functions:
- the trigonometric functions (row 356);
- the hyperbolic functions (row 357);
- exp, log, pow and the roots (row 358).

It is a plan only, with no code change, plus its admission-check results file. All 27 functions are built on one design, the bit-exact default of the math family's merged plan: every function returns exactly what vanilla Spark returns on the same host.

**Spark's code, per function.** A table pins each function's Java method and composition with file and line, and the details that change bits:
- **The log family's null** is a plain IEEE `<= 0` test (`<= -1` for `log1p`), so `-0.0` gives null and NaN does not.
- **`atanh`** calls `log1p` directly, without that null.
- **`atan2`** adds `0.0` to both arguments, which changes answers at signed zeros.
- **`csc` and `cot`** divide by zero to an infinity, not a null.
- **`asinh` and `acosh`** are Spark's own branch code, not fdlibm's.

**The kernel.** The operand vector is stored to scratch, the Java method is called once per live lane, and the result is loaded back:
- The dense body calls every lane.
- Otherwise the kernel skips null lanes, inactive lanes, the tail, and the log family's domain nulls. That is why every function is exact on every host from the first pull request.
- `asinh` and `acosh` make one call per lane, each branch calling only on the lanes that take it.

**The first fdlibm port, `exp`.** It follows the branches of fdlibm 5.3's `e_exp.c`:
- every finite lane in the primary range is computed in vector code, with the branches blended;
- NaN, the infinities, overflow, underflow and the subnormal scale are finished by a per-lane `StrictMath.exp`;
- the fully blended layout is kept as the measured alternative.

It pairs with the reference library's first function in https://github.com/vecbricks/vfdlibm. The port becomes the default only where it measures faster.

**Order of work:**
1. the baseline cases;
2. the per-lane form of rows 358, 356 and 357;
3. the `exp` port decision;
4. the other ports in the order of what each calls, with `pow` last;
5. the opt-in contract entries.

**Tests.** They cover:
- sampled bit-identity by raw bits on x86 and Arm;
- fixed vectors from fdlibm's thresholds;
- planted faults, each shown to be caught;
- fuzz productions and coverage rows.

**Admission check, on the laptop:**
- All 11 `e_exp.c` constants parse to the source's hex.
- Its high-word range tests agree with double compares on 7,860,480 pairs.
- On this x86 host, `Math` and `StrictMath` differ for `sin`, `cos`, `tan`, `tanh`, `cbrt`, `exp`, `log`, `log10` and `pow`, and agree for the other nine.

### Why are the changes needed?

The math functions still fall back to Spark's row path. This plan gives all 27 functions one exact design, so each row's pull requests build on it rather than re-deciding it. It also separates the per-lane form, which makes every function exact everywhere, from the fdlibm ports, which are only speed options.

### Does this PR introduce _any_ user-facing change?

No. This adds a plan document and a results file only. The three rows' status lines are applied separately, after the plan-text update of those rows merges.

### How was this patch tested?

`dev/varka_plan_lint.py` and `dev/varka_quote_check.py` are clean. The files are ASCII only, with no line over 100 columns. Every number the plan quotes is in its results file. fdlibm's `e_exp.c` and `fdlibm.h` were read from netlib to plan the port; neither is committed.

### Was this patch authored or co-authored using generative AI tooling?

Generated-by: Claude Code (Opus 5.5)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants