public class FtpsSnapshotMaterializer extends Object
Constructor and Description |
---|
FtpsSnapshotMaterializer(String ftpsSnapshotsRootDir)
Different apps can specify specific locations to download the temporary snapshot file.
|
Modifier and Type | Method and Description |
---|---|
void |
cleanup()
Close the ftps and delete the ftpsSnapshotsDir and all its contents
|
FileTierPartitionState |
materializeFtpsFromSnapshot(org.apache.kafka.common.TopicPartition topicPartition,
Algorithm checksumAlgorithm,
ByteBuffer snapshotBuffer,
org.apache.kafka.storage.internals.log.LogDirFailureChannel logDirFailureChannel,
org.apache.kafka.server.util.Scheduler scheduler,
org.apache.kafka.common.utils.Time time)
Performs materialization of a FTPS snapshot file and create a FTPS object
|
public FtpsSnapshotMaterializer(String ftpsSnapshotsRootDir)
ftpsSnapshotsRootDir
- A temporary directory on disk where we can download the snapshotpublic FileTierPartitionState materializeFtpsFromSnapshot(org.apache.kafka.common.TopicPartition topicPartition, Algorithm checksumAlgorithm, ByteBuffer snapshotBuffer, org.apache.kafka.storage.internals.log.LogDirFailureChannel logDirFailureChannel, org.apache.kafka.server.util.Scheduler scheduler, org.apache.kafka.common.utils.Time time) throws IOException
topicPartition
- User Topic Partition that this FTPS corresponds tochecksumAlgorithm
- the checksum algorithm configured when this snapshot was createdsnapshotBuffer
- ByteBuffer containing the contents of the TierPartitionState to restorelogDirFailureChannel
- Needed to create the FTPSscheduler
- Needed to create the FTPStime
- Needed to create the FTPSIOException
public void cleanup() throws IOException
IOException