reuvenlax commented on code in PR #40298:
URL: https://github.com/apache/beam/pull/40298#discussion_r4124703991
##########
runners/spark/src/main/java/org/apache/beam/runners/spark/structuredstreaming/translation/SparkSessionFactory.java:
##########
@@ -176,19 +179,22 @@ private static SparkSession.Builder sessionBuilder(
sparkConf.setAppName(options.getAppName());
}
- if (options.getFilesToStage() != null &&
!options.getFilesToStage().isEmpty()) {
- // Append the files to stage provided by the user to `spark.jars`.
- PipelineResources.prepareFilesForStaging(options);
- String[] filesToStage = filterFilesToStage(options,
Collections.emptyList());
- String[] jars = getSparkJars(sparkConf);
- sparkConf.setJars(jars.length > 0 ? ArrayUtils.addAll(jars,
filesToStage) : filesToStage);
- } else if (!sparkConf.contains("spark.jars") &&
!master.startsWith("local[")) {
- // Stage classpath if `spark.jars` not set and not in local mode.
- PipelineResources.prepareFilesForStaging(options);
- // Set `spark.jars`, exclude JRE libs and jars causing conflicts using
`userClassPathFirst`.
- sparkConf.setJars(filterFilesToStage(options, SPARK_JAR_EXCLUDES));
- // Enable `userClassPathFirst` to prevent issues with guava, jackson
and others.
- sparkConf.setIfMissing("spark.executor.userClassPathFirst", "true");
+ if (!master.startsWith("local")) {
Review Comment:
Yes, I think I can revert this change.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]