Skip to content

Conversation

@tdas
Copy link
Contributor

@tdas tdas commented May 12, 2017

What changes were proposed in this pull request?

StateStore.abort() should do a best effort attempt to clean up temporary resources. It should not throw errors, especially because its called in a TaskCompletionListener, because this error could hide previous real errors in the task.

How was this patch tested?

No unit test.

@tdas
Copy link
Contributor Author

tdas commented May 12, 2017

@zsxwing @marmbrus

@SparkQA
Copy link

SparkQA commented May 12, 2017

Test build #76845 has finished for PR 17958 at commit 1e36134.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@SparkQA
Copy link

SparkQA commented May 12, 2017

Test build #76844 has finished for PR 17958 at commit e10101e.

  • This patch fails Spark unit tests.
  • This patch does not merge cleanly.
  • This patch adds no public classes.

@SparkQA
Copy link

SparkQA commented May 12, 2017

Test build #3711 has finished for PR 17958 at commit 1e36134.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

if (tempDeltaFile != null) {
fs.delete(tempDeltaFile, true)
case e: Exception =>
logWarning(s"Error aborting version $newVersion into $this")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Include the exception.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dumb mistake.

fs.delete(tempDeltaFile, true)
}
} catch {
case c: ClosedChannelException =>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why need two cases? The error message is same, and the exception is also in the log.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Its debug though for the expected case.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe it should be a warning? In this case, the task will fail and it hurts nothing to output a warning but will be helpful when we have other issues.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gotcha!

@SparkQA
Copy link

SparkQA commented May 12, 2017

Test build #76880 has finished for PR 17958 at commit 820e4d5.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@zsxwing
Copy link
Member

zsxwing commented May 15, 2017

LGTM. Merging to master and 2.2. Thanks!

asfgit pushed a commit that referenced this pull request May 15, 2017
## What changes were proposed in this pull request?

StateStore.abort() should do a best effort attempt to clean up temporary resources. It should not throw errors, especially because its called in a TaskCompletionListener, because this error could hide previous real errors in the task.

## How was this patch tested?
No unit test.

Author: Tathagata Das <tathagata.das1565@gmail.com>

Closes #17958 from tdas/SPARK-20716.

(cherry picked from commit 271175e)
Signed-off-by: Shixiong Zhu <shixiong@databricks.com>
@asfgit asfgit closed this in 271175e May 15, 2017
robert3005 pushed a commit to palantir/spark that referenced this pull request May 19, 2017
## What changes were proposed in this pull request?

StateStore.abort() should do a best effort attempt to clean up temporary resources. It should not throw errors, especially because its called in a TaskCompletionListener, because this error could hide previous real errors in the task.

## How was this patch tested?
No unit test.

Author: Tathagata Das <tathagata.das1565@gmail.com>

Closes apache#17958 from tdas/SPARK-20716.
liyichao pushed a commit to liyichao/spark that referenced this pull request May 24, 2017
## What changes were proposed in this pull request?

StateStore.abort() should do a best effort attempt to clean up temporary resources. It should not throw errors, especially because its called in a TaskCompletionListener, because this error could hide previous real errors in the task.

## How was this patch tested?
No unit test.

Author: Tathagata Das <tathagata.das1565@gmail.com>

Closes apache#17958 from tdas/SPARK-20716.
cenyuhai pushed a commit to cenyuhai/spark that referenced this pull request Oct 8, 2017
## What changes were proposed in this pull request?

StateStore.abort() should do a best effort attempt to clean up temporary resources. It should not throw errors, especially because its called in a TaskCompletionListener, because this error could hide previous real errors in the task.

## How was this patch tested?
No unit test.

Author: Tathagata Das <tathagata.das1565@gmail.com>

Closes apache#17958 from tdas/SPARK-20716.

(cherry picked from commit 271175e)
Signed-off-by: Shixiong Zhu <shixiong@databricks.com>

(cherry picked from commit 82ae1f0)
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.

4 participants