Skip to content

Commit e07861b

Browse files
committed
fix rebase compilation issues
1 parent 382830c commit e07861b

File tree

4 files changed

+17
-31
lines changed

4 files changed

+17
-31
lines changed

fluss-client/src/main/java/org/apache/fluss/client/write/CompactedLogWriteBatch.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,11 @@ public int getSizeInBytes() {
118118
"Failed to build compacted log record batch.");
119119
}
120120

121+
@Override
122+
public boolean isLogBatch() {
123+
return true;
124+
}
125+
121126
@Override
122127
protected CompactedRow requireAndCastRow(InternalRow row) {
123128
checkArgument(

fluss-client/src/main/java/org/apache/fluss/client/write/IndexedLogWriteBatch.java

Lines changed: 5 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -59,35 +59,6 @@ public IndexedLogWriteBatch(
5959
MemoryLogRecordsIndexedBuilder.builder(
6060
schemaId, writeLimit, outputView, true);
6161

62-
@Override
63-
public boolean isLogBatch() {
64-
return true;
65-
}
66-
67-
@Override
68-
public boolean tryAppend(WriteRecord writeRecord, WriteCallback callback)
69-
throws Exception {
70-
checkNotNull(callback, "write callback must be not null");
71-
checkNotNull(writeRecord.getRow(), "row must not be null for log record");
72-
checkArgument(
73-
writeRecord.getKey() == null, "key must be null for log record");
74-
checkArgument(
75-
writeRecord.getTargetColumns() == null,
76-
"target columns must be null for log record");
77-
checkArgument(
78-
writeRecord.getRow() instanceof IndexedRow,
79-
"row must not be IndexRow for indexed log table");
80-
IndexedRow row = (IndexedRow) writeRecord.getRow();
81-
if (!recordsBuilder.hasRoomFor(row) || isClosed()) {
82-
return false;
83-
} else {
84-
recordsBuilder.append(ChangeType.APPEND_ONLY, row);
85-
recordCount++;
86-
callbacks.add(callback);
87-
return true;
88-
}
89-
}
90-
9162
@Override
9263
public boolean hasRoomFor(IndexedRow row) {
9364
return delegate.hasRoomFor(row);
@@ -146,6 +117,11 @@ public int getSizeInBytes() {
146117
"Failed to build indexed log record batch.");
147118
}
148119

120+
@Override
121+
public boolean isLogBatch() {
122+
return true;
123+
}
124+
149125
@Override
150126
protected IndexedRow requireAndCastRow(org.apache.fluss.row.InternalRow row) {
151127
checkArgument(row instanceof IndexedRow, "row must be IndexRow for indexed log table");

fluss-client/src/main/java/org/apache/fluss/client/write/WriteRecord.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,10 +129,14 @@ public static WriteRecord forArrowAppend(
129129

130130
/** Creates a write record for append operation for Compacted format. */
131131
public static WriteRecord forCompactedAppend(
132-
PhysicalTablePath tablePath, CompactedRow row, @Nullable byte[] bucketKey) {
132+
TableInfo tableInfo,
133+
PhysicalTablePath tablePath,
134+
CompactedRow row,
135+
@Nullable byte[] bucketKey) {
133136
checkNotNull(row);
134137
int estimatedSizeInBytes = CompactedLogRecord.sizeOf(row) + RECORD_BATCH_HEADER_SIZE;
135138
return new WriteRecord(
139+
tableInfo,
136140
tablePath,
137141
null,
138142
bucketKey,

fluss-client/src/test/java/org/apache/fluss/client/write/CompactedLogWriteBatchTest.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,8 @@ void testBatchAborted() throws Exception {
198198
}
199199

200200
private WriteRecord createWriteRecord() {
201-
return WriteRecord.forCompactedAppend(DATA1_PHYSICAL_TABLE_PATH, row, null);
201+
return WriteRecord.forCompactedAppend(
202+
DATA1_TABLE_INFO, DATA1_PHYSICAL_TABLE_PATH, row, null);
202203
}
203204

204205
private CompactedLogWriteBatch createLogWriteBatch(TableBucket tb, long baseLogOffset)

0 commit comments

Comments
 (0)