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

    https://github.com/apache/spark/pull/21601#discussion_r198667795
  
    --- Diff: 
core/src/main/scala/org/apache/spark/input/WholeTextFileInputFormat.scala ---
    @@ -53,6 +53,19 @@ private[spark] class WholeTextFileInputFormat
         val totalLen = files.map(file => if (file.isDirectory) 0L else 
file.getLen).sum
         val maxSplitSize = Math.ceil(totalLen * 1.0 /
           (if (minPartitions == 0) 1 else minPartitions)).toLong
    +
    +    // For small files we need to ensure the min split size per node & 
rack <= maxSplitSize
    +    val config = context.getConfiguration
    +    val minSplitSizePerNode = 
config.getLong(CombineFileInputFormat.SPLIT_MINSIZE_PERNODE, 0L)
    +    val minSplitSizePerRack = 
config.getLong(CombineFileInputFormat.SPLIT_MINSIZE_PERRACK, 0L)
    +
    +    if (maxSplitSize < minSplitSizePerNode) {
    +      super.setMinSplitSizeNode(maxSplitSize)
    --- End diff --
    
    Is there a point in even checking the configuration? Why not just set these 
to `0L` unconditionally?


---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to