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 @@ -492,16 +492,6 @@ public static MemoryRecordsBuilder builder(ByteBuffer buffer,
false, false, RecordBatch.NO_PARTITION_LEADER_EPOCH, maxSize);
}

public static MemoryRecordsBuilder idempotentBuilder(ByteBuffer buffer,
Compression compression,
long baseOffset,
long producerId,
short producerEpoch,
int baseSequence) {
return builder(buffer, RecordBatch.CURRENT_MAGIC_VALUE, compression, TimestampType.CREATE_TIME,
baseOffset, System.currentTimeMillis(), producerId, producerEpoch, baseSequence);
}

public static MemoryRecordsBuilder builder(ByteBuffer buffer,
byte magic,
Compression compression,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -872,7 +872,8 @@ public void testFetcherIgnoresControlRecords() {
int partitionLeaderEpoch = 0;

ByteBuffer buffer = ByteBuffer.allocate(1024);
MemoryRecordsBuilder builder = MemoryRecords.idempotentBuilder(buffer, Compression.NONE, 0L, producerId,
MemoryRecordsBuilder builder = MemoryRecords.builder(buffer, RecordBatch.CURRENT_MAGIC_VALUE, Compression.NONE,
TimestampType.CREATE_TIME, 0L, System.currentTimeMillis(), producerId,
producerEpoch, baseSequence);
builder.append(0L, "key".getBytes(), null);
builder.close();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -811,7 +811,8 @@ public void testFetcherIgnoresControlRecords() {
int partitionLeaderEpoch = 0;

ByteBuffer buffer = ByteBuffer.allocate(1024);
MemoryRecordsBuilder builder = MemoryRecords.idempotentBuilder(buffer, Compression.NONE, 0L, producerId,
MemoryRecordsBuilder builder = MemoryRecords.builder(buffer, RecordBatch.CURRENT_MAGIC_VALUE, Compression.NONE,
TimestampType.CREATE_TIME, 0L, System.currentTimeMillis(), producerId,
producerEpoch, baseSequence);
builder.append(0L, "key".getBytes(), null);
builder.close();
Expand Down
Loading