You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by SaintBacchus <gi...@git.apache.org> on 2014/11/28 13:10:44 UTC
[GitHub] spark pull request: [YARN][SPARK-3293]Fix yarn's web show "SUCCEED...
GitHub user SaintBacchus opened a pull request:
https://github.com/apache/spark/pull/3508
[YARN][SPARK-3293]Fix yarn's web show "SUCCEEDED" when the driver throw a exception in yarn-client
spark has five exit situations:
1.system.exit(0) - succeeds
2.clean exit main -succeeds
3.sc.stop - succeeds
4.system.exit(1) - failed
5.exception - failed
But now yarn-client's ExecutorLauncher is not care about this and just report Ok when driver is down.
So I catch this five situations in driver and send the relevant status to ExecutorLauncher to reply the AM status.
In addition, ExecutorLauncher does not need retry if it report the failed status because this driver has been ended before the sencond ExecutorLauncher launched.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/SaintBacchus/spark yarn-client-exception
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/spark/pull/3508.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #3508
----
commit f7206d473b499fcbd2f03fea55a7bfb32f4bb516
Author: carlmartin <ca...@gmail.com>
Date: 2014-11-28T02:24:50Z
yarn-client web bug
commit 7f4040595ac2ec18ccc2a53ebf44df9d02bf0e81
Author: carlmartin <ca...@gmail.com>
Date: 2014-11-28T02:30:46Z
yarn-client web bug
commit d9d016a3d88b26e1ea6e0574505ad5cd2259c2cb
Author: carlmartin <ca...@gmail.com>
Date: 2014-11-28T03:02:32Z
yarn-client web bug
commit 7a8540391e221f13fa6dd761e33855fd93fe1177
Author: carlmartin <ca...@gmail.com>
Date: 2014-11-28T05:54:42Z
yarn-client web bug
commit d6d5986954f668aad848fb1b3dad34c8e7a50309
Author: carlmartin <ca...@gmail.com>
Date: 2014-11-28T06:07:17Z
yarn-client web bug
commit 070ebc91520b67f58d3611317530c009fa5adc6c
Author: carlmartin <ca...@gmail.com>
Date: 2014-11-28T06:44:14Z
yarn-client web bug
commit a1080c06bfc4f2d52b57ca23e4eb1b1e906fb81e
Author: carlmartin <ca...@gmail.com>
Date: 2014-11-28T06:45:55Z
yarn-client web bug
commit 88dd4c1e00f84ccbfed6b39b3285975a0647a330
Author: carlmartin <ca...@gmail.com>
Date: 2014-11-28T06:55:39Z
yarn-client web bug
commit 8033093aa2fcfee2db842a1efc8a5e56ec79f3f1
Author: carlmartin <ca...@gmail.com>
Date: 2014-11-28T08:16:14Z
yarn-client web bug
commit 6e473d443fc5e9a19a7867438bf5f0d2b463e7e4
Author: carlmartin <ca...@gmail.com>
Date: 2014-11-28T08:45:49Z
yarn-client web bug
commit f716e3b1bc4ce2f2dbd81e8c6f7887542a3dddd6
Author: carlmartin <ca...@gmail.com>
Date: 2014-11-28T08:51:38Z
yarn-client web bug
commit 9dbca023ee11cfe2ace73a866142f1b8e215fdb7
Author: carlmartin <ca...@gmail.com>
Date: 2014-11-28T09:04:14Z
yarn-client web bug
commit daa6495aa976c4eabf3acddacae7c362b19f73f1
Author: carlmartin <ca...@gmail.com>
Date: 2014-11-28T09:27:01Z
yarn-client web bug
commit 451166220795efa242dc339a1cc0a262dddfb8d9
Author: carlmartin <ca...@gmail.com>
Date: 2014-11-28T10:49:33Z
Merge branch 'master' of https://github.com/apache/spark into yarn-client-exception
commit 411ab1a4ab8b4163f405d6083eedb26fd5284eb5
Author: carlmartin <ca...@gmail.com>
Date: 2014-11-28T11:11:04Z
yarn-client web bug
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark pull request: [YARN][SPARK-3293]Fix yarn's web show "SUCCEED...
Posted by oza <gi...@git.apache.org>.
Github user oza commented on the pull request:
https://github.com/apache/spark/pull/3508#issuecomment-64945372
@SaintBacchus I see, I got it.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark pull request: [YARN][SPARK-3293]Fix yarn's web show "SUCCEED...
Posted by SaintBacchus <gi...@git.apache.org>.
Github user SaintBacchus commented on the pull request:
https://github.com/apache/spark/pull/3508#issuecomment-65190248
By your suggestion @andrewor14 , do I just fix the two situations: user use sc.stop then report success and when exception occurs report failed? Is it right?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark pull request: [YARN][SPARK-3293]Fix yarn's web show "SUCCEED...
Posted by andrewor14 <gi...@git.apache.org>.
Github user andrewor14 commented on the pull request:
https://github.com/apache/spark/pull/3508#issuecomment-65137690
Hey @SaintBacchus as @tgravescs pointed out we can't use Java's security manager here until we understand the exact cause of the performance regression that entails. I think for the 1.2 release we should just have broken exit codes. For this patch it would be good to just fix the exception case if it's possible to do so without Java's security manager.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark pull request: [YARN][SPARK-3293]Fix yarn's web show "SUCCEED...
Posted by SaintBacchus <gi...@git.apache.org>.
Github user SaintBacchus commented on the pull request:
https://github.com/apache/spark/pull/3508#issuecomment-65190002
Hey @andrewor14 , it seems that using security manager may cause a performance impact as https://issues.apache.org/jira/browse/SPARK-4584 said.
So I tested it(using javaWordCount). They were almost the same and then using a bigger dataset to test. And same again: with security use 167 second by average and without it use 166seconds by average. So I doubt security manager will actually affect the performance of jvm?

---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark pull request: [YARN][SPARK-3293]Fix yarn's web show "SUCCEED...
Posted by oza <gi...@git.apache.org>.
Github user oza commented on the pull request:
https://github.com/apache/spark/pull/3508#issuecomment-64941638
Please note that YARN-2091 changed the error code: https://issues.apache.org/jira/browse/YARN-2091
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark pull request: [YARN][SPARK-3293]Fix yarn's web show "SUCCEED...
Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:
https://github.com/apache/spark/pull/3508#issuecomment-64887757
Can one of the admins verify this patch?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark pull request: [YARN][SPARK-3293]Fix yarn's web show "SUCCEED...
Posted by vanzin <gi...@git.apache.org>.
Github user vanzin commented on the pull request:
https://github.com/apache/spark/pull/3508#issuecomment-65283129
Just to reinforce, we shouldn't add a security manager without better understanding what impact it has. Feel free to file a bug if you'd like this investigated, but I like the policy of "don't use System.exit()" better.
In any case, it seems your patch will fail apps that do a `System.exit(0)` without the security manager, so that's something to think about. Cluster mode takes the opposite approach (all apps that use `System.exit()` succeed), but probably for a reason that does not apply here (AM retries).
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark pull request: [YARN][SPARK-3293]Fix yarn's web show "SUCCEED...
Posted by SaintBacchus <gi...@git.apache.org>.
Github user SaintBacchus closed the pull request at:
https://github.com/apache/spark/pull/3508
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark pull request: [YARN][SPARK-3293]Fix yarn's web show "SUCCEED...
Posted by tgravescs <gi...@git.apache.org>.
Github user tgravescs commented on a diff in the pull request:
https://github.com/apache/spark/pull/3508#discussion_r21090918
--- Diff: core/src/main/scala/org/apache/spark/scheduler/cluster/YarnSchedulerBackend.scala ---
@@ -92,6 +104,57 @@ private[spark] abstract class YarnSchedulerBackend(
}
/**
+ * This system security manager applies to the entire process.
+ * It's main purpose is to handle the case if the user code does a System.exit.
+ * This allows us to catch that and properly set the YARN application status and
+ * cleanup if needed.
+ */
+ private def setupSystemSecurityManager(amActor: ActorRef): Unit = {
--- End diff --
The securityManager in the AM was causing a performance impact and we just removed it. I expect the same issue to happen here. https://github.com/apache/spark/pull/3484
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark pull request: [YARN][SPARK-3293]Fix yarn's web show "SUCCEED...
Posted by SaintBacchus <gi...@git.apache.org>.
Github user SaintBacchus commented on the pull request:
https://github.com/apache/spark/pull/3508#issuecomment-64943681
@oza Thx for your notification, but this PR is just report the AM status to RM and let web show right status.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark pull request: [YARN][SPARK-3293]Fix yarn's web show "SUCCEED...
Posted by SaintBacchus <gi...@git.apache.org>.
Github user SaintBacchus commented on the pull request:
https://github.com/apache/spark/pull/3508#issuecomment-65367468
Ok, I close this PR for so many meanless commits and create a new PR to reslove this prolem.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark pull request: [YARN][SPARK-3293]Fix yarn's web show "SUCCEED...
Posted by andrewor14 <gi...@git.apache.org>.
Github user andrewor14 commented on the pull request:
https://github.com/apache/spark/pull/3508#issuecomment-65259690
Yeah the performance regression was difficult to reproduce according to @vanzin. I haven't been able to reproduce it myself but others have. Yes, this patch should only deal with the exception case since we can't safely and efficiently deal with exit codes.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark pull request: [YARN][SPARK-3293]Fix yarn's web show "SUCCEED...
Posted by andrewor14 <gi...@git.apache.org>.
Github user andrewor14 commented on the pull request:
https://github.com/apache/spark/pull/3508#issuecomment-65295994
Yeah I think what we want from this patch is the following behavior:
```
System.exit(X) = success
Uncaught exception = fail
sc.stop = success
```
I believe this is possible to do without the security manager. In the long run, the ideal behavior we want is:
```
System.exit(0) = success
System.exit(X) = fail, where X != 0
Uncaught exception = fail
sc.stop = success
```
But there is no easy way to do this without the security manager.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark pull request: [YARN][SPARK-3293]Fix yarn's web show "SUCCEED...
Posted by SaintBacchus <gi...@git.apache.org>.
Github user SaintBacchus commented on the pull request:
https://github.com/apache/spark/pull/3508#issuecomment-64887880
The relevant PR is https://github.com/apache/spark/pull/2311 and https://github.com/apache/spark/pull/2577
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org