public class FileTierPartitionStateSnapshotObject extends Object
Modifier and Type | Field and Description |
---|---|
static String |
TIER_PARTITION_STATE_METADATA_SNAPSHOTS_DIR |
Constructor and Description |
---|
FileTierPartitionStateSnapshotObject(UUID snapshotId,
long snapshotTimestampMs,
OffsetAndEpoch lastMaterializedEventOffsetAndEpoch,
int tierEpoch,
String baseName,
Algorithm checksumAlgorithm) |
Modifier and Type | Method and Description |
---|---|
String |
baseName() |
Algorithm |
checksumAlgorithm() |
static FileTierPartitionStateSnapshotObject |
decodeSnapshotName(String fileName)
Returns all the encoded information present as part of the tier metadata snapshot file name
|
Path |
encodeSnapshotName()
Returns the snapshot file path for the local on-disk snapshot, constructed using delimiter
File format:
|
boolean |
equals(Object o) |
int |
hashCode() |
static boolean |
isSnapshotFile(String fileName)
Checks if the given file is a tier metadata snapshot file or not.
|
OffsetAndEpoch |
lastMaterializedEventOffsetAndEpoch() |
static void |
maybeCreateAndCleanupSnapshotsDir(String basePath)
Helper util to create the snapshot directory (if it doesn't exist) and to clean up all the local/on-disk tier
metadata snapshot files
|
UUID |
snapshotId() |
long |
snapshotTimestampMs() |
int |
tierEpoch() |
String |
toString() |
public static final String TIER_PARTITION_STATE_METADATA_SNAPSHOTS_DIR
public FileTierPartitionStateSnapshotObject(UUID snapshotId, long snapshotTimestampMs, OffsetAndEpoch lastMaterializedEventOffsetAndEpoch, int tierEpoch, String baseName, Algorithm checksumAlgorithm)
public Path encodeSnapshotName()
public static FileTierPartitionStateSnapshotObject decodeSnapshotName(String fileName)
fileName
- the file name of the tier metadata snapshotIllegalArgumentException
- is file name is not correctly encodedpublic static boolean isSnapshotFile(String fileName)
fileName
- a file namepublic static void maybeCreateAndCleanupSnapshotsDir(String basePath) throws IOException
basePath
- the log directory pathIOException
public UUID snapshotId()
public long snapshotTimestampMs()
public OffsetAndEpoch lastMaterializedEventOffsetAndEpoch()
public int tierEpoch()
public Algorithm checksumAlgorithm()
public String baseName()