File tree Expand file tree Collapse file tree 3 files changed +6
-4
lines changed
catalyst/src/main/java/org/apache/spark/sql/connector
core/src/main/scala/org/apache/spark/sql/execution/datasources/v2 Expand file tree Collapse file tree 3 files changed +6
-4
lines changed Original file line number Diff line number Diff line change 18
18
19
19
import java .util .OptionalLong ;
20
20
21
+ /**
22
+ * Execution metrics for a Merge Operation for a Connector that supports RowLevelOperations
23
+ * of this type.
24
+ */
21
25
public interface MergeMetrics {
22
26
23
27
/**
Original file line number Diff line number Diff line change 18
18
package org .apache .spark .sql .connector .write ;
19
19
20
20
import org .apache .spark .annotation .Evolving ;
21
- import org .apache .spark .sql .connector .metric .CustomTaskMetric ;
22
21
import org .apache .spark .sql .connector .metric .MergeMetrics ;
23
22
24
23
/**
@@ -108,7 +107,8 @@ default void onDataWriterCommit(WriterCommitMessage message) {}
108
107
void abort (WriterCommitMessage [] messages );
109
108
110
109
/**
111
- * Similar to {@link #commit(WriterCommitMessage[])}, but providing merge exec metrics to this batch write.
110
+ * Similar to {@link #commit(WriterCommitMessage[])}, but providing merge exec metrics to
111
+ * this batch write.
112
112
* @param metrics merge execution metrics
113
113
*/
114
114
default void commitMerge (WriterCommitMessage [] messages , MergeMetrics metrics ) {
Original file line number Diff line number Diff line change @@ -425,7 +425,6 @@ trait V2TableWriteExec extends V2CommandExec with UnaryExecNode with AdaptiveSpa
425
425
tempRdd
426
426
}
427
427
}
428
-
429
428
// introduce a local var to avoid serializing the whole class
430
429
val task = writingTask
431
430
val writerFactory = batchWrite.createBatchWriterFactory(
@@ -456,7 +455,6 @@ trait V2TableWriteExec extends V2CommandExec with UnaryExecNode with AdaptiveSpa
456
455
)
457
456
458
457
val mergeMetricsOpt = getMergeMetrics(query)
459
-
460
458
logInfo(log " Data source write support ${MDC (LogKeys .BATCH_WRITE , batchWrite)} is committing. " )
461
459
mergeMetricsOpt match {
462
460
case Some (metrics) => batchWrite.commitMerge(messages, metrics)
You can’t perform that action at this time.
0 commit comments