public static class TierObjectStore.TierPartitionStateSnapshotMetadata extends Object implements TierObjectStore.ObjectStoreMetadata
Constructor and Description |
---|
TierPartitionStateSnapshotMetadata(TopicIdPartition topicIdPartition,
FileTierPartitionStateSnapshotObject snapshotObject) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
static String |
extractEncodedName(String snapshotPath)
Helper method to extract the encoded name of snapshot file from the full path it was uploaded under.
|
int |
hashCode() |
Map<String,String> |
objectMetadata(Optional<String> clusterIdOpt,
Optional<Integer> brokerIdOpt)
Converts an ObjectStoreMetadata to a map of metadata that may be useful to place on
objects in object storage, if this functionality is present in the object store
implementation of choice
|
TierObjectStore.OpaqueData |
opaqueData() |
static String |
pathPrefix(String keyPrefix,
TopicIdPartition topicIdPartition)
Utility method to build common prefix for all snapshots of a given topic partition
|
FileTierPartitionStateSnapshotObject |
snapshotObject() |
String |
toPath(String keyPrefix,
TierObjectStore.FileType fileType)
Converts the ObjectStoreMetadata to an object store key path, taking into account a
given key prefix and file type
|
TopicIdPartition |
topicIdPartition() |
String |
toString() |
int |
version() |
public TierPartitionStateSnapshotMetadata(TopicIdPartition topicIdPartition, FileTierPartitionStateSnapshotObject snapshotObject)
public TopicIdPartition topicIdPartition()
public FileTierPartitionStateSnapshotObject snapshotObject()
public int version()
public String toPath(String keyPrefix, TierObjectStore.FileType fileType)
TierObjectStore.ObjectStoreMetadata
toPath
in interface TierObjectStore.ObjectStoreMetadata
keyPrefix
- object key prefixfileType
- object file typepublic static String pathPrefix(String keyPrefix, TopicIdPartition topicIdPartition)
keyPrefix
- prefix to usetopicIdPartition
- topic partition whose common snapshot path prefix is to be createdpublic static String extractEncodedName(String snapshotPath)
snapshotPath
- full path of the snapshot file returned by a list call to object storepublic Map<String,String> objectMetadata(Optional<String> clusterIdOpt, Optional<Integer> brokerIdOpt)
TierObjectStore.ObjectStoreMetadata
objectMetadata
in interface TierObjectStore.ObjectStoreMetadata
clusterIdOpt
- optional kafka cluster idbrokerIdOpt
- optional kafka broker idpublic TierObjectStore.OpaqueData opaqueData()
opaqueData
in interface TierObjectStore.ObjectStoreMetadata