Skip to content

Commit

Permalink
Spark 3.4: Set useCommitCoordinator to false in batch writes (#9028)
Browse files Browse the repository at this point in the history
This change cherrypicks PR #9017 to Spark 3.4.

Co-authored-by: Huaxin Gao <[email protected]>
  • Loading branch information
huaxingao and Huaxin Gao authored Nov 11, 2023
1 parent 13fd06d commit d7f8e91
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,11 @@ public DataWriterFactory createBatchWriterFactory(PhysicalWriteInfo info) {
writeProperties);
}

@Override
public boolean useCommitCoordinator() {
return false;
}

@Override
public void commit(WriterCommitMessage[] messages) {
PositionDeletesRewriteCoordinator coordinator = PositionDeletesRewriteCoordinator.get();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,11 @@ public DeltaWriterFactory createBatchWriterFactory(PhysicalWriteInfo info) {
return new PositionDeltaWriteFactory(tableBroadcast, command, context, writeProperties);
}

@Override
public boolean useCommitCoordinator() {
return false;
}

@Override
public void commit(WriterCommitMessage[] messages) {
RowDelta rowDelta = table.newRowDelta();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,11 @@ public DataWriterFactory createBatchWriterFactory(PhysicalWriteInfo info) {
return createWriterFactory();
}

@Override
public boolean useCommitCoordinator() {
return false;
}

@Override
public void abort(WriterCommitMessage[] messages) {
SparkWrite.this.abort(messages);
Expand Down

0 comments on commit d7f8e91

Please sign in to comment.