-
Notifications
You must be signed in to change notification settings - Fork 28.9k
[SPARK-47152][SQL][BUILD] Provide CodeHaus Jackson dependencies via a new optional directory
#45237
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
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 |
|---|---|---|
|
|
@@ -189,6 +189,12 @@ echo "Build flags: $@" >> "$DISTDIR/RELEASE" | |
| # Copy jars | ||
| cp "$SPARK_HOME"/assembly/target/scala*/jars/* "$DISTDIR/jars/" | ||
|
|
||
| # Only create the hive-jackson directory if they exist. | ||
| for f in "$DISTDIR"/jars/jackson-*-asl-*.jar; do | ||
| mkdir -p "$DISTDIR"/hive-jackson | ||
| mv $f "$DISTDIR"/hive-jackson/ | ||
| done | ||
|
Comment on lines
+192
to
+196
Member
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. Btw, what's benefit to have separate class path for hive-jackson jars?
Member
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. There are 5 main benefits like
|
||
|
|
||
| # Only create the yarn directory if the yarn artifacts were built. | ||
| if [ -f "$SPARK_HOME"/common/network-yarn/target/scala*/spark-*-yarn-shuffle.jar ]; then | ||
| mkdir "$DISTDIR/yarn" | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -271,6 +271,8 @@ Map<String, String> getEffectiveConfig() throws IOException { | |
| Properties p = loadPropertiesFile(); | ||
| p.stringPropertyNames().forEach(key -> | ||
| effectiveConfig.computeIfAbsent(key, p::getProperty)); | ||
| effectiveConfig.putIfAbsent(SparkLauncher.DRIVER_DEFAULT_EXTRA_CLASS_PATH, | ||
| SparkLauncher.DRIVER_DEFAULT_EXTRA_CLASS_PATH_VALUE); | ||
|
Comment on lines
+274
to
+275
Member
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. Non SparkLauncher triggered (e.g., the Spark deamons you mentioned) classes are not affected, right?
Member
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. And, same question, why only driver default extra class is specified here?
Member
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. Yes, the following This is a command on the driver side. The executors are supposed to use
Member
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. Hmm, why we need to specially deal with
Member
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. This is required because, when it's loaded from the file,
Member
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. Yes, here. When
Member
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. I see. Although this is only used by
Member
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.
Member
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. Hmm, but I saw you only changed
Member
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. Let me double-check with them |
||
| } | ||
| return effectiveConfig; | ||
| } | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -54,6 +54,10 @@ public class SparkLauncher extends AbstractLauncher<SparkLauncher> { | |
|
|
||
| /** Configuration key for the driver memory. */ | ||
| public static final String DRIVER_MEMORY = "spark.driver.memory"; | ||
| /** Configuration key for the driver default extra class path. */ | ||
| public static final String DRIVER_DEFAULT_EXTRA_CLASS_PATH = | ||
| "spark.driver.defaultExtraClassPath"; | ||
| public static final String DRIVER_DEFAULT_EXTRA_CLASS_PATH_VALUE = "hive-jackson/*"; | ||
|
Comment on lines
+57
to
+60
Member
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. So even users who use no hive distributions. they will also have this default class patch value in the extra class path, right?
Member
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. Yes, the configuration is simply pointing non-existing directly. As you can see in |
||
| /** Configuration key for the driver class path. */ | ||
| public static final String DRIVER_EXTRA_CLASSPATH = "spark.driver.extraClassPath"; | ||
| /** Configuration key for the default driver VM options. */ | ||
|
|
@@ -65,6 +69,10 @@ public class SparkLauncher extends AbstractLauncher<SparkLauncher> { | |
|
|
||
| /** Configuration key for the executor memory. */ | ||
| public static final String EXECUTOR_MEMORY = "spark.executor.memory"; | ||
| /** Configuration key for the executor default extra class path. */ | ||
| public static final String EXECUTOR_DEFAULT_EXTRA_CLASS_PATH = | ||
| "spark.executor.defaultExtraClassPath"; | ||
| public static final String EXECUTOR_DEFAULT_EXTRA_CLASS_PATH_VALUE = "hive-jackson/*"; | ||
| /** Configuration key for the executor class path. */ | ||
| public static final String EXECUTOR_EXTRA_CLASSPATH = "spark.executor.extraClassPath"; | ||
| /** Configuration key for the default executor VM options. */ | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -267,6 +267,12 @@ private List<String> buildSparkSubmitCommand(Map<String, String> env) | |
| Map<String, String> config = getEffectiveConfig(); | ||
| boolean isClientMode = isClientMode(config); | ||
| String extraClassPath = isClientMode ? config.get(SparkLauncher.DRIVER_EXTRA_CLASSPATH) : null; | ||
| String defaultExtraClassPath = config.get(SparkLauncher.DRIVER_DEFAULT_EXTRA_CLASS_PATH); | ||
| if (extraClassPath == null || extraClassPath.trim().isEmpty()) { | ||
| extraClassPath = defaultExtraClassPath; | ||
| } else { | ||
| extraClassPath += File.pathSeparator + defaultExtraClassPath; | ||
| } | ||
|
|
||
| List<String> cmd = buildJavaCommand(extraClassPath); | ||
| // Take Thrift/Connect Server as daemon | ||
|
|
@@ -498,6 +504,8 @@ protected boolean handle(String opt, String value) { | |
| case DRIVER_MEMORY -> conf.put(SparkLauncher.DRIVER_MEMORY, value); | ||
| case DRIVER_JAVA_OPTIONS -> conf.put(SparkLauncher.DRIVER_EXTRA_JAVA_OPTIONS, value); | ||
| case DRIVER_LIBRARY_PATH -> conf.put(SparkLauncher.DRIVER_EXTRA_LIBRARY_PATH, value); | ||
| case DRIVER_DEFAULT_CLASS_PATH -> | ||
| conf.put(SparkLauncher.DRIVER_DEFAULT_EXTRA_CLASS_PATH, value); | ||
|
Comment on lines
+507
to
+508
Member
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. Hmm, why spark-submit can only specify driver default extra class path, cannot it specify executor default extra class path?
Member
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. No~ This is We already have more general ones are
Member
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. Please see here for the detail.
Member
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. BTW, is your concern is about that the following is insufficient?
Member
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. Let me double-check it.
Member
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. To @viirya ,
Member
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. This is identical with the way of the existing Apache Spark's
Member
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. Yea, It's probably okay as we already have
Member
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.
Member
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. We cannot create |
||
| case DRIVER_CLASS_PATH -> conf.put(SparkLauncher.DRIVER_EXTRA_CLASSPATH, value); | ||
| case CONF -> { | ||
| checkArgument(value != null, "Missing argument to %s", CONF); | ||
|
|
||

Uh oh!
There was an error while loading. Please reload this page.