spark-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aarondav <...@git.apache.org>
Subject [GitHub] spark pull request: [SPARK-6627] Some clean-up in shuffle code.
Date Tue, 31 Mar 2015 07:19:04 GMT
Github user aarondav commented on a diff in the pull request:

    https://github.com/apache/spark/pull/5286#discussion_r27457202
  
    --- Diff: core/src/main/scala/org/apache/spark/shuffle/IndexShuffleBlockManager.scala
---
    @@ -39,25 +41,18 @@ import org.apache.spark.storage._
     // Note: Changes to the format in this file should be kept in sync with
     // org.apache.spark.network.shuffle.StandaloneShuffleBlockManager#getSortBasedShuffleBlockData().
     private[spark]
    -class IndexShuffleBlockManager(conf: SparkConf) extends ShuffleBlockManager {
    +class IndexShuffleBlockManager(conf: SparkConf) extends ShuffleBlockResolver {
     
       private lazy val blockManager = SparkEnv.get.blockManager
     
       private val transportConf = SparkTransportConf.fromSparkConf(conf)
     
    -  /**
    -   * Mapping to a single shuffleBlockId with reduce ID 0.
    -   * */
    -  def consolidateId(shuffleId: Int, mapId: Int): ShuffleBlockId = {
    -    ShuffleBlockId(shuffleId, mapId, 0)
    -  }
    -
       def getDataFile(shuffleId: Int, mapId: Int): File = {
    -    blockManager.diskBlockManager.getFile(ShuffleDataBlockId(shuffleId, mapId, 0))
    +    blockManager.diskBlockManager.getFile(ShuffleDataBlockId(shuffleId, mapId, NOOP_REDUCE_ID))
    --- End diff --
    
    A second option would be to overload ShuffleDataBlockId/ShuffleIndexBlockId to have apply
methods that take only the two parameters, since this is a pretty common case (being the default).


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Mime
View raw message