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

    https://github.com/apache/spark/pull/14093#discussion_r70111252
  
    --- Diff: 
core/src/main/java/org/apache/spark/shuffle/sort/UnsafeShuffleWriter.java ---
    @@ -349,12 +349,19 @@ void forceSorterToSpill() throws IOException {
             for (int i = 0; i < spills.length; i++) {
               final long partitionLengthInSpill = 
spills[i].partitionLengths[partition];
               if (partitionLengthInSpill > 0) {
    -            InputStream partitionInputStream =
    -              new LimitedInputStream(spillInputStreams[i], 
partitionLengthInSpill);
    -            if (compressionCodec != null) {
    -              partitionInputStream = 
compressionCodec.compressedInputStream(partitionInputStream);
    +            InputStream partitionInputStream = null;
    +            boolean innerThrewException = true;
    --- End diff --
    
    Yeah, I agree with @rdblue here; note that we use this `Closables.close` 
pattern elsewhere in Spark's Java code as well.


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