public final class ForStResourceContainer extends Object implements AutoCloseable
This should be the only entrance for ForStStateBackend to get ForSt options, and should be properly (and necessarily) closed to prevent resource leak.
Constructor and Description |
---|
ForStResourceContainer() |
ForStResourceContainer(ForStOptionsFactory optionsFactory) |
ForStResourceContainer(ForStOptionsFactory optionsFactory,
OpaqueMemoryResource<org.apache.flink.state.forst.ForStSharedResources> sharedResources) |
ForStResourceContainer(ReadableConfig configuration,
ForStOptionsFactory optionsFactory,
OpaqueMemoryResource<org.apache.flink.state.forst.ForStSharedResources> sharedResources,
File localBasePath,
URI remoteBasePath,
boolean enableStatistics) |
Modifier and Type | Method and Description |
---|---|
void |
clearDirectories()
Clear local and remote directories.
|
void |
close() |
org.rocksdb.ColumnFamilyOptions |
getColumnOptions()
Gets the ForSt
ColumnFamilyOptions to be used for all ForSt instances. |
org.rocksdb.DBOptions |
getDbOptions()
Gets the ForSt
DBOptions to be used for ForSt instances. |
File |
getLocalBasePath() |
File |
getLocalForStPath() |
org.rocksdb.ReadOptions |
getReadOptions()
Gets the ForSt
ReadOptions to be used for read operations. |
URI |
getRemoteBasePath() |
org.rocksdb.WriteOptions |
getWriteOptions()
Gets the ForSt
WriteOptions to be used for write operations. |
void |
prepareDirectories()
Prepare local and remote directories.
|
@VisibleForTesting public ForStResourceContainer()
@VisibleForTesting public ForStResourceContainer(@Nullable ForStOptionsFactory optionsFactory)
@VisibleForTesting public ForStResourceContainer(@Nullable ForStOptionsFactory optionsFactory, @Nullable OpaqueMemoryResource<org.apache.flink.state.forst.ForStSharedResources> sharedResources)
public ForStResourceContainer(ReadableConfig configuration, @Nullable ForStOptionsFactory optionsFactory, @Nullable OpaqueMemoryResource<org.apache.flink.state.forst.ForStSharedResources> sharedResources, @Nullable File localBasePath, @Nullable URI remoteBasePath, boolean enableStatistics)
public org.rocksdb.DBOptions getDbOptions()
DBOptions
to be used for ForSt instances.public org.rocksdb.ColumnFamilyOptions getColumnOptions()
ColumnFamilyOptions
to be used for all ForSt instances.public org.rocksdb.WriteOptions getWriteOptions()
WriteOptions
to be used for write operations.public org.rocksdb.ReadOptions getReadOptions()
ReadOptions
to be used for read operations.public void prepareDirectories() throws Exception
Exception
- if any unexpected behaviors.public void clearDirectories() throws Exception
Exception
- if any unexpected behaviors.public void close() throws Exception
close
in interface AutoCloseable
Exception
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.