public class OffsetCheckpoint
extends java.lang.Object
<version> <n> <topic_name_1> <partition_1> <offset_1> . . . <topic_name_n> <partition_n> <offset_n>The first line contains a number designating the format version (currently 0), the get line contains a number giving the total number of offsets. Each successive line gives a topic/partition/offset triple separated by spaces.
Constructor and Description |
---|
OffsetCheckpoint(java.io.File file) |
Modifier and Type | Method and Description |
---|---|
void |
delete() |
java.util.Map<org.apache.kafka.common.TopicPartition,java.lang.Long> |
read() |
java.lang.String |
toString() |
void |
write(java.util.Map<org.apache.kafka.common.TopicPartition,java.lang.Long> offsets) |
public void write(java.util.Map<org.apache.kafka.common.TopicPartition,java.lang.Long> offsets) throws java.io.IOException
java.io.IOException
- if any file operation fails with an IO exceptionpublic java.util.Map<org.apache.kafka.common.TopicPartition,java.lang.Long> read() throws java.io.IOException
java.io.IOException
- if any file operation fails with an IO exceptionjava.lang.IllegalArgumentException
- if the offset checkpoint version is unknownpublic void delete() throws java.io.IOException
java.io.IOException
- if there is any IO exception during deletepublic java.lang.String toString()
toString
in class java.lang.Object