forked from apache/spark
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[SPARK-22839][K8S] Remove the use of init-container for downloading r…
…emote dependencies ## What changes were proposed in this pull request? Removal of the init-container for downloading remote dependencies. Built off of the work done by vanzin in an attempt to refactor driver/executor configuration elaborated in [this](https://issues.apache.org/jira/browse/SPARK-22839) ticket. ## How was this patch tested? This patch was tested with unit and integration tests. Author: Ilan Filonenko <[email protected]> Closes apache#20669 from ifilonenko/remove-init-container.
- Loading branch information
1 parent
4de638c
commit f15906d
Showing
35 changed files
with
241 additions
and
1,665 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
48 changes: 48 additions & 0 deletions
48
examples/src/main/scala/org/apache/spark/examples/SparkRemoteFileTest.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one or more | ||
* contributor license agreements. See the NOTICE file distributed with | ||
* this work for additional information regarding copyright ownership. | ||
* The ASF licenses this file to You under the Apache License, Version 2.0 | ||
* (the "License"); you may not use this file except in compliance with | ||
* the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
// scalastyle:off println | ||
package org.apache.spark.examples | ||
|
||
import java.io.File | ||
|
||
import org.apache.spark.SparkFiles | ||
import org.apache.spark.sql.SparkSession | ||
|
||
/** Usage: SparkRemoteFileTest [file] */ | ||
object SparkRemoteFileTest { | ||
def main(args: Array[String]) { | ||
if (args.length < 1) { | ||
System.err.println("Usage: SparkRemoteFileTest <file>") | ||
System.exit(1) | ||
} | ||
val spark = SparkSession | ||
.builder() | ||
.appName("SparkRemoteFileTest") | ||
.getOrCreate() | ||
val sc = spark.sparkContext | ||
val rdd = sc.parallelize(Seq(1)).map(_ => { | ||
val localLocation = SparkFiles.get(args(0)) | ||
println(s"${args(0)} is stored at: $localLocation") | ||
new File(localLocation).isFile | ||
}) | ||
val truthCheck = rdd.collect().head | ||
println(s"Mounting of ${args(0)} was $truthCheck") | ||
spark.stop() | ||
} | ||
} | ||
// scalastyle:on println |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.