Skip to content

Commit

Permalink
Spark 3.5: Set useCommitCoordinator to false in batch writes (#9017)
Browse files Browse the repository at this point in the history
Co-authored-by: Huaxin Gao <huaxin.gao@apple.com>
  • Loading branch information
huaxingao and Huaxin Gao authored Nov 10, 2023
1 parent 774d0e8 commit 6a9c182
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 @@ -171,6 +171,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 @@ -271,6 +271,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 6a9c182

Please sign in to comment.