Github user markhamstra commented on a diff in the pull request:
https://github.com/apache/spark/pull/6648#discussion_r33626496
--- Diff: core/src/main/scala/org/apache/spark/storage/BlockId.scala ---
@@ -56,18 +56,27 @@ case class RDDBlockId(rddId: Int, splitIndex: Int)
extends BlockId {
// Format of the shuffle block ids (including data and index) should be
kept in sync with
//
org.apache.spark.network.shuffle.ExternalShuffleBlockResolver#getBlockData().
@DeveloperApi
-case class ShuffleBlockId(shuffleId: Int, mapId: Int, reduceId: Int)
extends BlockId {
- override def name: String = "shuffle_" + shuffleId + "_" + mapId + "_" +
reduceId
+case class ShuffleBlockId(shuffleId: Int, mapId: Int, reduceId: Int,
stageAttemptId: Int)
+ extends BlockId {
+ override def name: String = {
+ "shuffle_" + shuffleId + "_" + mapId + "_" + reduceId + "_" +
stageAttemptId
+ }
}
@DeveloperApi
-case class ShuffleDataBlockId(shuffleId: Int, mapId: Int, reduceId: Int)
extends BlockId {
- override def name: String = "shuffle_" + shuffleId + "_" + mapId + "_" +
reduceId + ".data"
+case class ShuffleDataBlockId(shuffleId: Int, mapId: Int, stageAttemptId:
Int, reduceId: Int)
+ extends BlockId {
+ override def name: String = {
+ "shuffle_" + shuffleId + "_" + mapId + "_" + reduceId + "_" +
stageAttemptId + ".data"
+ }
}
@DeveloperApi
-case class ShuffleIndexBlockId(shuffleId: Int, mapId: Int, reduceId: Int)
extends BlockId {
- override def name: String = "shuffle_" + shuffleId + "_" + mapId + "_" +
reduceId + ".index"
+case class ShuffleIndexBlockId(shuffleId: Int, mapId: Int, stageAttemptId:
Int, reduceId: Int)
+ extends BlockId {
+ override def name: String = {
+ "shuffle_" + shuffleId + "_" + mapId + "_" + reduceId + "_" +
stageAttemptId + ".index"
+ }
--- End diff --
The `name` strings are pretty repetitive, and I think the look a little
better as:
```scala
s"shuffle_${shuffleId}_${mapId}_${reduceId}_${stageAttemptId}"
```
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]