Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,10 @@ public static ProduceLogRequest makeProduceLogRequest(
if (tableBucket.getPartitionId() != null) {
pbProduceLogReqForBucket.setPartitionId(tableBucket.getPartitionId());
}
if (readyBatch.writeBatch().getOriginalPartitionName() != null) {
pbProduceLogReqForBucket.setOriginalPartitionName(
readyBatch.writeBatch().getOriginalPartitionName());
}
});
return request;
}
Expand Down Expand Up @@ -202,6 +206,11 @@ public static PutKvRequest makePutKvRequest(
if (tableBucket.getPartitionId() != null) {
pbPutKvReqForBucket.setPartitionId(tableBucket.getPartitionId());
}
KvWriteBatch kvWriteBatch = (KvWriteBatch) readyBatch.writeBatch();
if (kvWriteBatch.getOriginalPartitionName() != null) {
pbPutKvReqForBucket.setOriginalPartitionName(
kvWriteBatch.getOriginalPartitionName());
}
});
return request;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@
import org.apache.fluss.record.bytesview.BytesView;
import org.apache.fluss.row.InternalRow;

import javax.annotation.Nullable;

import java.io.IOException;
import java.util.List;

Expand All @@ -49,11 +51,19 @@ protected AbstractRowLogWriteBatch(
PhysicalTablePath physicalTablePath,
int schemaId,
WriteFormat writeFormat,
@Nullable String originalPartitionName,
long createdMs,
AbstractPagedOutputView outputView,
MemoryLogRecordsRowBuilder<R> recordsBuilder,
String buildErrorMessage) {
super(tableId, bucketId, physicalTablePath, schemaId, writeFormat, createdMs);
super(
tableId,
bucketId,
physicalTablePath,
schemaId,
writeFormat,
originalPartitionName,
createdMs);
this.outputView = outputView;
this.recordsBuilder = recordsBuilder;
this.buildErrorMessage = buildErrorMessage;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,17 @@ public ArrowLogWriteBatch(
int schemaId,
ArrowWriter arrowWriter,
AbstractPagedOutputView outputView,
@Nullable String originalPartitionName,
long createdMs,
@Nullable LogRecordBatchStatisticsCollector statisticsCollector) {
super(tableId, bucketId, physicalTablePath, schemaId, WriteFormat.ARROW_LOG, createdMs);
super(
tableId,
bucketId,
physicalTablePath,
schemaId,
WriteFormat.ARROW_LOG,
originalPartitionName,
createdMs);
this.outputView = outputView;
this.recordsBuilder =
MemoryLogRecordsArrowBuilder.builder(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import org.apache.fluss.row.compacted.CompactedRow;
import org.apache.fluss.rpc.messages.ProduceLogRequest;

import javax.annotation.Nullable;
import javax.annotation.concurrent.NotThreadSafe;

import static org.apache.fluss.utils.Preconditions.checkArgument;
Expand All @@ -46,13 +47,15 @@ public CompactedLogWriteBatch(
int schemaId,
int writeLimit,
AbstractPagedOutputView outputView,
@Nullable String originalPartitionName,
long createdMs) {
super(
tableId,
bucketId,
physicalTablePath,
schemaId,
WriteFormat.COMPACTED_LOG,
originalPartitionName,
createdMs,
outputView,
MemoryLogRecordsCompactedBuilder.builder(schemaId, writeLimit, outputView, true),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
import org.apache.fluss.row.indexed.IndexedRow;
import org.apache.fluss.rpc.messages.ProduceLogRequest;

import javax.annotation.Nullable;
import javax.annotation.concurrent.NotThreadSafe;

import static org.apache.fluss.utils.Preconditions.checkArgument;
Expand All @@ -45,13 +46,15 @@ public IndexedLogWriteBatch(
int schemaId,
int writeLimit,
AbstractPagedOutputView outputView,
@Nullable String originalPartitionName,
long createdMs) {
super(
tableId,
bucketId,
physicalTablePath,
schemaId,
WriteFormat.INDEXED_LOG,
originalPartitionName,
createdMs,
outputView,
MemoryLogRecordsIndexedBuilder.builder(schemaId, writeLimit, outputView, true),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,15 @@ public KvWriteBatch(
AbstractPagedOutputView outputView,
@Nullable int[] targetColumns,
MergeMode mergeMode,
@Nullable String originalPartitionName,
long createdMs) {
super(
tableId,
bucketId,
physicalTablePath,
schemaId,
WriteFormat.fromKvFormat(kvFormat),
originalPartitionName,
createdMs);
this.outputView = outputView;
this.recordsBuilder =
Expand Down
Loading
Loading