Class RocksDBStateUploader
- java.lang.Object
-
- org.apache.flink.contrib.streaming.state.RocksDBStateUploader
-
- All Implemented Interfaces:
Closeable,AutoCloseable
public class RocksDBStateUploader extends Object
Help class for uploading RocksDB state files.
-
-
Field Summary
Fields Modifier and Type Field Description protected ExecutorServiceexecutorService
-
Constructor Summary
Constructors Constructor Description RocksDBStateUploader(int numberOfSnapshottingThreads)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()List<org.apache.flink.runtime.state.IncrementalKeyedStateHandle.HandleAndLocalPath>uploadFilesToCheckpointFs(List<Path> files, org.apache.flink.runtime.state.CheckpointStreamFactory checkpointStreamFactory, org.apache.flink.runtime.state.CheckpointedStateScope stateScope, org.apache.flink.core.fs.CloseableRegistry closeableRegistry, org.apache.flink.core.fs.CloseableRegistry tmpResourcesRegistry)Upload all the files to checkpoint fileSystem using specified number of threads.
-
-
-
Field Detail
-
executorService
protected final ExecutorService executorService
-
-
Method Detail
-
uploadFilesToCheckpointFs
public List<org.apache.flink.runtime.state.IncrementalKeyedStateHandle.HandleAndLocalPath> uploadFilesToCheckpointFs(@Nonnull List<Path> files, org.apache.flink.runtime.state.CheckpointStreamFactory checkpointStreamFactory, org.apache.flink.runtime.state.CheckpointedStateScope stateScope, org.apache.flink.core.fs.CloseableRegistry closeableRegistry, org.apache.flink.core.fs.CloseableRegistry tmpResourcesRegistry) throws Exception
Upload all the files to checkpoint fileSystem using specified number of threads.- Parameters:
files- The files will be uploaded to checkpoint filesystem.checkpointStreamFactory- The checkpoint streamFactory used to create outputstream.stateScope-- Throws:
Exception- Thrown if can not upload all the files.
-
close
public void close()
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable
-
-