Skip to content

Commit 5b1d1c3

Browse files
committed
nits
1 parent 15d8ed5 commit 5b1d1c3

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

core/src/main/scala/org/apache/spark/SparkContext.scala

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ import org.apache.hadoop.mapred.{FileInputFormat, InputFormat, JobConf, Sequence
4040
import org.apache.hadoop.mapreduce.{InputFormat => NewInputFormat, Job => NewHadoopJob}
4141
import org.apache.hadoop.mapreduce.lib.input.{FileInputFormat => NewFileInputFormat}
4242

43-
import org.apache.spark.annotation.DeveloperApi
43+
import org.apache.spark.annotation.{DeveloperApi, Experimental}
4444
import org.apache.spark.broadcast.Broadcast
4545
import org.apache.spark.deploy.{LocalSparkCluster, SparkHadoopUtil}
4646
import org.apache.spark.executor.{Executor, ExecutorMetrics, ExecutorMetricsSource}
@@ -1533,6 +1533,7 @@ class SparkContext(config: SparkConf) extends Logging {
15331533
def listFiles(): Seq[String] = addedFiles.keySet.toSeq
15341534

15351535
/**
1536+
* :: Experimental ::
15361537
* Add an archive to be downloaded and unpacked with this Spark job on every node.
15371538
*
15381539
* If an archive is added during execution, it will not be available until the next TaskSet
@@ -1547,15 +1548,18 @@ class SparkContext(config: SparkConf) extends Logging {
15471548
*
15481549
* @since 3.1.0
15491550
*/
1551+
@Experimental
15501552
def addArchive(path: String): Unit = {
15511553
addFile(path, false, false, isArchive = true)
15521554
}
15531555

15541556
/**
1557+
* :: Experimental ::
15551558
* Returns a list of archive paths that are added to resources.
15561559
*
15571560
* @since 3.1.0
15581561
*/
1562+
@Experimental
15591563
def listArchives(): Seq[String] = addedArchives.keySet.toSeq
15601564

15611565
/**

core/src/main/scala/org/apache/spark/util/Utils.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -586,7 +586,7 @@ private[spark] object Utils extends Logging {
586586
lowerSrc.endsWith(".tar.gz") || lowerSrc.endsWith(".tgz") || lowerSrc.endsWith(".tar")) {
587587
FileUtil.unTar(source, dest)
588588
} else {
589-
logWarning("Cannot unpack " + source)
589+
logWarning(s"Cannot unpack $source, just copying it to $dest.")
590590
copyRecursive(source, dest)
591591
}
592592
}

core/src/test/scala/org/apache/spark/deploy/SparkSubmitSuite.scala

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,7 @@ class SparkSubmitSuite
335335
sys.props("SPARK_SUBMIT") should be ("true")
336336
}
337337

338-
test("SPARK-33530: handles standalone mode") {
338+
test("SPARK-33530: handles standalone mode with archives") {
339339
val clArgs = Seq(
340340
"--master", "spark://localhost:1234",
341341
"--executor-memory", "5g",
@@ -356,7 +356,6 @@ class SparkSubmitSuite
356356
childArgsStr should include ("arg1 arg2")
357357
mainClass should be ("org.SomeClass")
358358

359-
// In yarn cluster mode, also adding jars to classpath
360359
classpath(0) should endWith ("thejar.jar")
361360
classpath(1) should endWith ("one.jar")
362361
classpath(2) should endWith ("two.jar")

0 commit comments

Comments
 (0)