-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-1825] Make Windows Spark client work fine with Linux YARN cluster #3943
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
Conversation
Modified environment strings and path separators to platform-independent style if possible.
|
Test build #25204 has started for PR 3943 at commit
|
|
Test build #25204 has finished for PR 3943 at commit
|
|
Test PASSed. |
|
Hey @tsudukim have you tested this on a real YARN cluster? Also, does this work across YARN versions, say 2.2 through 2.5? |
|
thanks @andrewor14 for following this. I have tested it on two YARN clusters: 2.3 and 2.5. Both has 1 master and 3 slaves. This patch is implemented as to work across YARN versions. When we apply this patch on old YARN clusters (2.2, 2.3), the behaviour doesn't change from now because just the function which the current code uses ( |
|
@tsudukim Recently, YARN module was refactored so could you rebase your change? |
|
@tsudukim sorry for the delay in looking at this, could you rebase to latest master? |
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.
This is probably not a big deal, since this is not in any hot path, but it seems wasteful to look for the right method every time this method is called instead of caching the method to be called. I'd do this:
private lazy val expandMethod = Try(classOf[Environment].getMethod("$$"))
.getOrElse(classOf[Environment].getMethod("$"))
Then your method becomes just:
def expandEnvironment(environment: Environment): String = \
expandMethod.invoke(environment).asInstanceOf[String]
|
@tsudukim were you able to actually run the unit tests on Windows? I tried that before but failed... |
|
@sarutak @tgravescs @vanzin Thank you for your comments! |
|
@tsudukim Would you have time this week to look at this please? I was hoping for this fix to make it in 1.2.1! |
…-1825 Conflicts: yarn/src/main/scala/org/apache/spark/deploy/yarn/ClientBase.scala yarn/src/main/scala/org/apache/spark/deploy/yarn/YarnSparkHadoopUtil.scala yarn/src/test/scala/org/apache/spark/deploy/yarn/ClientSuite.scala
|
Test build #26316 has started for PR 3943 at commit
|
|
@vanzin Actually, test for org.apache.spark.deploy.yarn.* fails in Windows even in master branch. @aniketbhatnagar Sorry for the delay. I managed to do it, but I don't think this patch goes into 1.2.1. 1.3 might be good. |
|
Test build #26316 has finished for PR 3943 at commit
|
|
Test PASSed. |
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.
you missed one Utils.isWindows
|
Ok LGTM aside from the minor comments I pointed out. I will fix these myself when I merge this into master. Thanks a lot @tsudukim |
Modified environment strings and path separators to platform-independent style if possible.