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

    https://github.com/apache/spark/pull/5622#discussion_r28986044
  
    --- Diff: 
core/src/main/scala/org/apache/spark/util/collection/ExternalSorter.scala ---
    @@ -736,11 +734,16 @@ private[spark] class ExternalSorter[K, V, C](
           val writeStartTime = System.nanoTime
           util.Utils.tryWithSafeFinally {
             for (i <- 0 until numPartitions) {
    -          val in = new 
FileInputStream(partitionWriters(i).fileSegment().file)
    -          util.Utils.tryWithSafeFinally {
    -            lengths(i) = org.apache.spark.util.Utils.copyStream(in, out, 
false, transferToEnabled)
    -          } {
    -            in.close()
    +          val file = partitionWriters(i).fileSegment().file
    +          if (!file.exists()) {
    +            lengths(i) = 0
    +          } else {
    +            val in = new FileInputStream(file)
    +            util.Utils.tryWithSafeFinally {
    --- End diff --
    
    Shouldn't we avoid using partial package names like this? Just import 
spark.util.Utils.


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

Reply via email to