Class OffsetCheckpointReadOnly
java.lang.Object
io.confluent.kafka.schemaregistry.storage.OffsetCheckpoint
io.confluent.kafka.schemaregistry.storage.OffsetCheckpointReadOnly
- All Implemented Interfaces:
Closeable,AutoCloseable
This class read a map of topic/partition=>offsets from a file.
The format of the file is UTF-8 text containing the following:
<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.
-
Field Summary
Fields inherited from class io.confluent.kafka.schemaregistry.storage.OffsetCheckpoint
CHECKPOINT_FILE_NAME, file, LOCK_FILE_NAME -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidsetUpLockFile(File baseDir) voidWrite the given offsets to the checkpoint file.
-
Constructor Details
-
OffsetCheckpointReadOnly
- Throws:
IOException
-
-
Method Details
-
setUpLockFile
- Overrides:
setUpLockFilein classOffsetCheckpoint
-
write
Description copied from class:OffsetCheckpointWrite the given offsets to the checkpoint file. All offsets should be non-negative.- Overrides:
writein classOffsetCheckpoint
-