Search in sources :

Example 1 with LongRef

use of kafka.common.LongRef in project kafka by apache.

the class UncompressedRecordBatchValidationBenchmark method measureAssignOffsetsNonCompressed.

@Benchmark
public void measureAssignOffsetsNonCompressed(Blackhole bh) {
    MemoryRecords records = MemoryRecords.readableRecords(singleBatchBuffer.duplicate());
    LogValidator.assignOffsetsNonCompressed(records, new TopicPartition("a", 0), new LongRef(startingOffset), System.currentTimeMillis(), false, TimestampType.CREATE_TIME, Long.MAX_VALUE, 0, new AppendOrigin.Client$(), messageVersion, brokerTopicStats);
}
Also used : AppendOrigin(kafka.log.AppendOrigin) TopicPartition(org.apache.kafka.common.TopicPartition) LongRef(kafka.common.LongRef) MemoryRecords(org.apache.kafka.common.record.MemoryRecords) Benchmark(org.openjdk.jmh.annotations.Benchmark)

Example 2 with LongRef

use of kafka.common.LongRef in project kafka by apache.

the class CompressedRecordBatchValidationBenchmark method measureValidateMessagesAndAssignOffsetsCompressed.

@Benchmark
public void measureValidateMessagesAndAssignOffsetsCompressed(Blackhole bh) {
    MemoryRecords records = MemoryRecords.readableRecords(singleBatchBuffer.duplicate());
    LogValidator.validateMessagesAndAssignOffsetsCompressed(records, new TopicPartition("a", 0), new LongRef(startingOffset), Time.SYSTEM, System.currentTimeMillis(), CompressionCodec.getCompressionCodec(compressionType.id), CompressionCodec.getCompressionCodec(compressionType.id), false, messageVersion, TimestampType.CREATE_TIME, Long.MAX_VALUE, 0, new AppendOrigin.Client$(), ApiVersion.latestVersion(), brokerTopicStats, requestLocal);
}
Also used : AppendOrigin(kafka.log.AppendOrigin) TopicPartition(org.apache.kafka.common.TopicPartition) LongRef(kafka.common.LongRef) MemoryRecords(org.apache.kafka.common.record.MemoryRecords) Benchmark(org.openjdk.jmh.annotations.Benchmark)

Aggregations

LongRef (kafka.common.LongRef)2 AppendOrigin (kafka.log.AppendOrigin)2 TopicPartition (org.apache.kafka.common.TopicPartition)2 MemoryRecords (org.apache.kafka.common.record.MemoryRecords)2 Benchmark (org.openjdk.jmh.annotations.Benchmark)2