You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by yucai <gi...@git.apache.org> on 2015/12/10 03:09:59 UTC

[GitHub] spark pull request: [WIP][SPARK-12196][Core] Store blocks in stora...

Github user yucai commented on a diff in the pull request:

    https://github.com/apache/spark/pull/10225#discussion_r47181555
  
    --- Diff: core/src/main/scala/org/apache/spark/storage/DiskBlockManager.scala ---
    @@ -80,6 +77,65 @@ private[spark] class DiskBlockManager(blockManager: BlockManager, conf: SparkCon
         new File(subDir, filename)
       }
     
    +  def getFileDefault(filename: String): File = {
    +    _getFile(filename, localDirs)
    +  }
    +  var getFile = getFileDefault _
    +
    +  private val hierarchyStore = conf.getOption("spark.storage.hierarchyStore")
    +  if (hierarchyStore.isDefined) {
    +    val HSLayers: Array[(String, Long)] =
    +      hierarchyStore.get.trim.split(",").map {
    +        s => val x = s.trim.split(" +")
    +          (x(0), Utils.byteStringAsGb(x(1)))
    --- End diff --
    
    This number is the *threshold* before dropping into the next layer. 
    We do get free space by using getFreeSpace method, like in getFileHierarchy.


---
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