THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
...
Code Block | ||
---|---|---|
| ||
deleteRecords(Map<TopicPartition, Long>DeleteRecords> partitionsAndOffsets) |
Proposed Changes
...
Code Block | ||
---|---|---|
| ||
public DeleteRecordsResult deleteRecords(Map<TopicPartition, Long>DeleteRecords> partitionsAndOffsets) public DeleteRecordsResult deleteRecords(Map<TopicPartition, Long>DeleteRecords> partitionsAndOffsets, DeleteRecordsOptions options) |
Where :
TopicPartition
comes from org.apache.kafka.common package
DeleteRecords
and DeleteRecordsResult
is are defined as follow.
Code Block | ||
---|---|---|
| ||
/** Describe records to delete */
public class DeleteRecords {
private Long offset;
/**
* Delete all the records before the given {@code offset}
*/
public static DeleteRecords deleteBefore(Long offset) { ... }
}
public class DeleteRecordsResult {
// package access constructor
Map<TopicPartition, KafkaFuture<Long>> values() { ... }
KafkaFuture<Long> all() { ... }
} |
...
In the DeleteRecordsResult
, the Long value accessed by values() and all() method specifies the low watermark as described in the KIP-107.
...