Skip to content

Commit

Permalink
[CELEBORN-1096] Avoid initializing SortShuffleManager when stop
Browse files Browse the repository at this point in the history
### What changes were proposed in this pull request?

### Why are the changes needed?
If there is no fallback to the Spark SortShuffleManager, it will be initialized once when stopping, and then stopped again. This is not necessary.

### Does this PR introduce _any_ user-facing change?

### How was this patch tested?

Closes apache#2052 from cxzl25/CELEBORN-1096.

Authored-by: sychen <[email protected]>
Signed-off-by: Fu Chen <[email protected]>
  • Loading branch information
cxzl25 authored and cfmcgrady committed Oct 30, 2023
1 parent df40a28 commit 70366ed
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -167,8 +167,9 @@ public void stop() {
if (lifecycleManager != null) {
lifecycleManager.stop();
}
if (sortShuffleManager() != null) {
sortShuffleManager().stop();
if (_sortShuffleManager != null) {
_sortShuffleManager.stop();
_sortShuffleManager = null;
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -197,8 +197,8 @@ public void stop() {
lifecycleManager.stop();
lifecycleManager = null;
}
if (sortShuffleManager() != null) {
sortShuffleManager().stop();
if (_sortShuffleManager != null) {
_sortShuffleManager.stop();
_sortShuffleManager = null;
}
}
Expand Down

0 comments on commit 70366ed

Please sign in to comment.