chia7712 commented on a change in pull request #9758:
URL: https://github.com/apache/kafka/pull/9758#discussion_r584222409
##########
File path:
jmh-benchmarks/src/main/java/org/apache/kafka/jmh/common/FetchResponseBenchmark.java
##########
@@ -78,19 +78,25 @@ public void setup() {
for (int topicIdx = 0; topicIdx < topicCount; topicIdx++) {
String topic = UUID.randomUUID().toString();
for (int partitionId = 0; partitionId < partitionCount;
partitionId++) {
- FetchResponse.PartitionData<MemoryRecords> partitionData = new
FetchResponse.PartitionData<>(
- Errors.NONE, 0, 0, 0, Optional.empty(),
Collections.emptyList(), records);
+ FetchResponseData.PartitionData partitionData = new
FetchResponseData.PartitionData()
+ .setPartitionIndex(partitionId)
+ .setErrorCode(Errors.NONE.code())
+ .setHighWatermark(0)
+ .setLastStableOffset(0)
+ .setLogStartOffset(0)
Review comment:
updated
##########
File path: core/src/test/scala/unit/kafka/server/FetchSessionTest.scala
##########
@@ -155,13 +155,28 @@ class FetchSessionTest {
assertEquals(Optional.of(1), epochs1(tp1))
assertEquals(Optional.of(2), epochs1(tp2))
- val response = new util.LinkedHashMap[TopicPartition,
FetchResponse.PartitionData[Records]]
- response.put(tp0, new FetchResponse.PartitionData(Errors.NONE, 100, 100,
- 100, null, null))
- response.put(tp1, new FetchResponse.PartitionData(
- Errors.NONE, 10, 10, 10, null, null))
- response.put(tp2, new FetchResponse.PartitionData(
- Errors.NONE, 5, 5, 5, null, null))
+ val response = new util.LinkedHashMap[TopicPartition,
FetchResponseData.PartitionData]
+ response.put(tp0, new FetchResponseData.PartitionData()
+ .setErrorCode(Errors.NONE.code)
+ .setHighWatermark(100)
+ .setLastStableOffset(100)
+ .setLogStartOffset(100)
+ .setAbortedTransactions(null)
+ .setRecords(null))
Review comment:
updated
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]