-
Notifications
You must be signed in to change notification settings - Fork 29.1k
[SPARK-40635][YARN][TESTS] Fix yarn module daily test failed with hadoop2
#38079
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
Changes from all commits
e8e6b7f
5ad8024
93bdf77
64f0e0b
b17b27f
bd89c95
4e9a0d8
2712ae0
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1470,6 +1470,11 @@ private[spark] object Client extends Logging { | |
| addClasspathEntry(getClusterPath(sparkConf, cp), env) | ||
| } | ||
|
|
||
| val cpSet = extraClassPath match { | ||
| case Some(classPath) if Utils.isTesting => classPath.split(File.pathSeparator).toSet | ||
| case _ => Set.empty[String] | ||
| } | ||
|
|
||
| addClasspathEntry(Environment.PWD.$$(), env) | ||
|
|
||
| addClasspathEntry(Environment.PWD.$$() + Path.SEPARATOR + LOCALIZED_CONF_DIR, env) | ||
|
|
@@ -1513,7 +1518,13 @@ private[spark] object Client extends Logging { | |
| } | ||
|
|
||
| sys.env.get(ENV_DIST_CLASSPATH).foreach { cp => | ||
| addClasspathEntry(getClusterPath(sparkConf, cp), env) | ||
| // SPARK-40635: during the test, add a jar de-duplication process to avoid | ||
| // that the startup command can't be executed due to the too long classpath. | ||
| val newCp = if (Utils.isTesting) { | ||
| cp.split(File.pathSeparator) | ||
| .filterNot(cpSet.contains).mkString(File.pathSeparator) | ||
| } else cp | ||
| addClasspathEntry(getClusterPath(sparkConf, newCp), env) | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Try to deduplicate jars that have been added to
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is it necessary to change it to but I think de duplication may also be useful for the production environment |
||
| } | ||
|
|
||
| // Add the localized Hadoop config at the end of the classpath, in case it contains other | ||
|
|
||
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.
Maybe let's add a comment with mentioning the JIRA number.
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.
ok, will add comments after the hadoop2 check pass