Skip to content

Conversation

@devaraj-kavali
Copy link

What changes were proposed in this pull request?

Adding the default UncaughtExceptionHandler to the MesosClusterDispatcher.

How was this patch tested?

I verified it manually, when any of the dispatcher thread gets uncaught exceptions then the default UncaughtExceptionHandler will handle those exceptions.

@tnachen
Copy link
Contributor

tnachen commented Jun 22, 2016

ok to test

@SparkQA
Copy link

SparkQA commented Jun 22, 2016

Test build #60999 has finished for PR 13072 at commit 2f306a7.

  • This patch fails Spark unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@SparkQA
Copy link

SparkQA commented Dec 27, 2016

Test build #70646 has finished for PR 13072 at commit 7f1c9f6.

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

@skonto
Copy link
Contributor

skonto commented Jan 21, 2017

@mgummelt @tnachen should we ask for a merge?

@tnachen
Copy link
Contributor

tnachen commented Jan 22, 2017

LGTM, @srowen can you please take a look?

@srowen
Copy link
Member

srowen commented Jan 23, 2017

We only otherwise do this in Executor.scala. I'm trying to understand if this is the right thing to do? I don't doubt it, just don't know.

@devaraj-kavali
Copy link
Author

MesosClusterDispatcher also has multiple threads like Executor, when any one thread terminates in the MesosClusterDispatcher process due to some error/exception it keeps running without performing the terminated thread functionality. I think we need to handle those uncaught exceptions from the MesosClusterDispatcher process threads using the UncaughtExceptionHandler and take the action instead of running the MesosClusterDispatcher without performing the functionality and without notifying the user.

@devaraj-kavali
Copy link
Author

@srowen Can you check this?

@srowen
Copy link
Member

srowen commented Feb 8, 2017

I can't really evaluate the change; is anyone else familiar with Mesos around to comment? that'd be best.

@skonto
Copy link
Contributor

skonto commented Feb 15, 2017

LGTM. @srowen Ideally all processes we have should handle thread termination correctly, same applies to MesosClusterDispatcher. Btw I think the call in Executor.scala which sets the handler should be done in static code and ASAP, for example in MesosExecutorBackend this should happen in its main method. From what I see right now the call is executed when a new Executor class is instantiated which might be a bit late because for example the createExecutorEnv call which always comes first, creates its own threads (eg. MapoutTracker threads).

@mgummelt
Copy link

LGTM. @srowen please merge.

Out of curiosity, @devaraj-kavali what exception were you seeing?

@devaraj-kavali
Copy link
Author

Thanks @mgummelt for the confirmation, It throws SparkException with the bug SPARK-15359/#13143.

@SparkQA
Copy link

SparkQA commented Feb 25, 2017

Test build #3585 has finished for PR 13072 at commit 7f1c9f6.

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

@srowen
Copy link
Member

srowen commented Feb 25, 2017

Merged to master

@asfgit asfgit closed this in 410392e Feb 25, 2017
Yunni pushed a commit to Yunni/spark that referenced this pull request Feb 27, 2017
…ny thread gets UncaughtException

## What changes were proposed in this pull request?

Adding the default UncaughtExceptionHandler to the MesosClusterDispatcher.
## How was this patch tested?

I verified it manually, when any of the dispatcher thread gets uncaught exceptions then the default UncaughtExceptionHandler will handle those exceptions.

Author: Devaraj K <[email protected]>

Closes apache#13072 from devaraj-kavali/SPARK-15288.
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.

6 participants