Skip to content

[SPARK-34589][CORE] Make BypassMergeSortShuffleWriter close partitionWriters in case of success#31704

Closed
dongjoon-hyun wants to merge 1 commit intoapache:masterfrom
dongjoon-hyun:SPARK-34589
Closed

[SPARK-34589][CORE] Make BypassMergeSortShuffleWriter close partitionWriters in case of success#31704
dongjoon-hyun wants to merge 1 commit intoapache:masterfrom
dongjoon-hyun:SPARK-34589

Conversation

@dongjoon-hyun
Copy link
Member

@dongjoon-hyun dongjoon-hyun commented Mar 2, 2021

What changes were proposed in this pull request?

This PR aims to close partitionWriters when BypassMergeSortShuffleWriter.stop with success.

Why are the changes needed?

In case of failure, we call writer.revertPartialWritesAndClose and delete the files.
Likewise, we had better close the resources at this level.

Does this PR introduce any user-facing change?

No.

How was this patch tested?

Pass the existing UTs.

@dongjoon-hyun
Copy link
Member Author

Hi, @mridulm and @Ngone51 .
How do you think about this?

@SparkQA
Copy link

SparkQA commented Mar 2, 2021

Test build #135634 has started for PR 31704 at commit 79e6c5d.

@dongjoon-hyun
Copy link
Member Author

Oops. Sorry guys. I realized that writer.write has try (DiskBlockObjectWriter writer = partitionWriters[I]). I'm closing this.

      writer.write(
        rdd.iterator(partition, context).asInstanceOf[Iterator[_ <: Product2[Any, Any]]])
      val mapStatus = writer.stop(success = true)

@dongjoon-hyun dongjoon-hyun deleted the SPARK-34589 branch March 2, 2021 07:35
@SparkQA
Copy link

SparkQA commented Mar 2, 2021

Kubernetes integration test starting
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/40213/

@SparkQA
Copy link

SparkQA commented Mar 2, 2021

Kubernetes integration test status failure
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/40213/

@github-actions github-actions bot added the CORE label Mar 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants