@@ -374,14 +374,6 @@ private[spark] class Client(
374374
375375 val statCache : Map [URI , FileStatus ] = HashMap [URI , FileStatus ]()
376376
377- val oldLog4jConf = Option (System .getenv(" SPARK_LOG4J_CONF" ))
378- if (oldLog4jConf.isDefined) {
379- logWarning(
380- " SPARK_LOG4J_CONF detected in the system environment. This variable has been " +
381- " deprecated. Please refer to the \" Launching Spark on YARN\" documentation " +
382- " for alternatives." )
383- }
384-
385377 def addDistributedUri (uri : URI ): Boolean = {
386378 val uriStr = uri.toString()
387379 if (distributedUris.contains(uriStr)) {
@@ -503,25 +495,16 @@ private[spark] class Client(
503495 }
504496
505497 /**
506- * Copy a few resources to the distributed cache if their scheme is not "local".
498+ * Copy user jar to the distributed cache if their scheme is not "local".
507499 * Otherwise, set the corresponding key in our SparkConf to handle it downstream.
508- * Each resource is represented by a 3-tuple of:
509- * (1) destination resource name,
510- * (2) local path to the resource,
511- * (3) Spark property key to set if the scheme is not local
512500 */
513- List (
514- (APP_JAR_NAME , args.userJar, APP_JAR ),
515- (" log4j.properties" , oldLog4jConf.orNull, null )
516- ).foreach { case (destName, path, confKey) =>
517- if (path != null && ! path.trim().isEmpty()) {
518- val (isLocal, localizedPath) = distribute(path, destName = Some (destName))
519- if (isLocal && confKey != null ) {
520- require(localizedPath != null , s " Path $path already distributed. " )
521- // If the resource is intended for local use only, handle this downstream
522- // by setting the appropriate property
523- sparkConf.set(confKey, localizedPath)
524- }
501+ for (jar <- Option (args.userJar); if ! jar.trim.isEmpty) {
502+ val (isLocal, localizedPath) = distribute(jar, destName = Some (APP_JAR_NAME ))
503+ if (isLocal) {
504+ require(localizedPath != null , s " Path $jar already distributed " )
505+ // If the resource is intended for local use only, handle this downstream
506+ // by setting the appropriate property
507+ sparkConf.set(APP_JAR , localizedPath)
525508 }
526509 }
527510
0 commit comments