forked from apache/spark
-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[SPARK-25299] Add shuffle map output un-registration hooks upon fetch…
… failure (#609) We realized that there's complexity with whether or not map outputs should be unregistered, and thus should be recomputed. Previously, we were using a boolean, then, a three-way switch. But these modes do not capture a lot of intricacies with how this should work - in particular, for our async upload proof of concept, we end up unregistering all the map outputs written by an executor, despite the fact that this would invalidate and re-write all the map outputs that were persisted to the remote storage system.
- Loading branch information
1 parent
5abde44
commit d551551
Showing
15 changed files
with
191 additions
and
177 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
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
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
41 changes: 41 additions & 0 deletions
41
core/src/main/scala/org/apache/spark/shuffle/ShuffleDataIOUtils.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,41 @@ | ||
/* | ||
* 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. | ||
*/ | ||
|
||
package org.apache.spark.shuffle | ||
|
||
import org.apache.spark.SparkConf | ||
import org.apache.spark.internal.config.SHUFFLE_IO_PLUGIN_CLASS | ||
import org.apache.spark.shuffle.api.ShuffleDataIO | ||
import org.apache.spark.util.Utils | ||
|
||
private[spark] object ShuffleDataIOUtils { | ||
|
||
/** | ||
* The prefix of spark config keys that are passed from the driver to the executor. | ||
*/ | ||
val SHUFFLE_SPARK_CONF_PREFIX = "spark.shuffle.plugin." | ||
|
||
def loadShuffleDataIO(conf: SparkConf): ShuffleDataIO = { | ||
val configuredPluginClasses = conf.get(SHUFFLE_IO_PLUGIN_CLASS) | ||
val maybeIO = Utils.loadExtensions( | ||
classOf[ShuffleDataIO], Seq(configuredPluginClasses), conf) | ||
require(maybeIO.nonEmpty, s"At least one valid shuffle plugin must be specified by config " + | ||
s"${SHUFFLE_IO_PLUGIN_CLASS.key}, but $configuredPluginClasses resulted in zero valid " + | ||
s"plugins.") | ||
maybeIO.head | ||
} | ||
} |
Oops, something went wrong.