public class KRaftSnapshotObject extends Object implements Comparable<KRaftSnapshotObject>
File name:
Modifier and Type | Field and Description |
---|---|
static int |
VERSION_V0 |
Constructor and Description |
---|
KRaftSnapshotObject(org.apache.kafka.common.Uuid topicId,
int partition,
String clusterId,
int nodeId,
long appendTimeStampMs,
org.apache.kafka.raft.OffsetAndEpoch snapshotId) |
Modifier and Type | Method and Description |
---|---|
long |
appendTimeStampMs() |
String |
clusterId() |
int |
compareTo(KRaftSnapshotObject o) |
static KRaftSnapshotObject |
decodePath(String keyPrefix,
String filePath)
Decode path deserializes the object store file path to object metadata
|
String |
encodePath(String keyPrefix,
int version)
Encode path serializes the object store file path
|
boolean |
equals(Object o) |
int |
hashCode() |
int |
nodeId() |
int |
partition() |
org.apache.kafka.raft.OffsetAndEpoch |
snapshotId() |
org.apache.kafka.common.Uuid |
topicId() |
String |
toString() |
public static final int VERSION_V0
public KRaftSnapshotObject(org.apache.kafka.common.Uuid topicId, int partition, String clusterId, int nodeId, long appendTimeStampMs, org.apache.kafka.raft.OffsetAndEpoch snapshotId)
public String encodePath(String keyPrefix, int version)
keyPrefix
- the key prefix to be usedversion
- the current versionpublic static KRaftSnapshotObject decodePath(String keyPrefix, String filePath)
keyPrefix
- the key prefix to be usedfilePath
- the object store file pathpublic int compareTo(KRaftSnapshotObject o)
compareTo
in interface Comparable<KRaftSnapshotObject>
public org.apache.kafka.common.Uuid topicId()
public int partition()
public String clusterId()
public int nodeId()
public long appendTimeStampMs()
public org.apache.kafka.raft.OffsetAndEpoch snapshotId()