Class ForStResourceContainer

  • All Implemented Interfaces:
    AutoCloseable

    public final class ForStResourceContainer
    extends Object
    implements AutoCloseable
    The container for ForSt resources, including option factory and shared resource among instances.

    This should be the only entrance for ForStStateBackend to get ForSt options, and should be properly (and necessarily) closed to prevent resource leak.

    • Constructor Detail

      • ForStResourceContainer

        @VisibleForTesting
        public ForStResourceContainer()
      • ForStResourceContainer

        @VisibleForTesting
        public ForStResourceContainer​(@Nullable
                                      ForStOptionsFactory optionsFactory)
      • ForStResourceContainer

        @VisibleForTesting
        public ForStResourceContainer​(@Nullable
                                      ForStOptionsFactory optionsFactory,
                                      @Nullable
                                      org.apache.flink.runtime.memory.OpaqueMemoryResource<org.apache.flink.state.forst.ForStSharedResources> sharedResources)
      • ForStResourceContainer

        public ForStResourceContainer​(org.apache.flink.configuration.ReadableConfig configuration,
                                      @Nullable
                                      ForStOptionsFactory optionsFactory,
                                      @Nullable
                                      org.apache.flink.runtime.memory.OpaqueMemoryResource<org.apache.flink.state.forst.ForStSharedResources> sharedResources,
                                      ForStPathContainer pathContainer,
                                      org.apache.flink.core.execution.RecoveryClaimMode claimMode,
                                      @Nullable
                                      org.apache.flink.runtime.state.CheckpointStorageAccess checkpointStorageAccess,
                                      org.apache.flink.metrics.MetricGroup metricGroup,
                                      boolean enableStatistics)
    • Method Detail

      • getDbOptions

        public org.forstdb.DBOptions getDbOptions()
        Gets the ForSt DBOptions to be used for ForSt instances.
      • getColumnOptions

        public org.forstdb.ColumnFamilyOptions getColumnOptions()
        Gets the ForSt ColumnFamilyOptions to be used for all ForSt instances.
      • getWriteOptions

        public org.forstdb.WriteOptions getWriteOptions()
        Gets the ForSt WriteOptions to be used for write operations.
      • getReadOptions

        public org.forstdb.ReadOptions getReadOptions()
        Gets the ForSt ReadOptions to be used for read operations.
      • getBasePath

        public org.apache.flink.core.fs.Path getBasePath()
      • getDbPath

        public org.apache.flink.core.fs.Path getDbPath()
      • isCoordinatorInline

        public boolean isCoordinatorInline()
      • isWriteInline

        public boolean isWriteInline()
      • getReadIoParallelism

        public int getReadIoParallelism()
      • getWriteIoParallelism

        public int getWriteIoParallelism()
      • prepareDirectories

        public void prepareDirectories()
                                throws Exception
        Prepare local and remote directories.
        Throws:
        Exception - if any unexpected behaviors.
      • clearDirectories

        public void clearDirectories()
                              throws Exception
        Clear local and remote directories.
        Throws:
        Exception - if any unexpected behaviors.
      • forceClearRemoteDirectories

        public void forceClearRemoteDirectories()
                                         throws Exception
        Throws:
        Exception
      • getWriteBufferManagerCapacity

        public Long getWriteBufferManagerCapacity()
        Gets write buffer manager capacity.
        Returns:
        the capacity of the write buffer manager, or null if write buffer manager is not enabled.
      • getQueryTimeAfterNumEntries

        public Long getQueryTimeAfterNumEntries()
        Gets the "queryTimeAfterNumEntries" parameter from the configuration.
      • getPeriodicCompactionTime

        public Duration getPeriodicCompactionTime()
        Gets the "getPeriodicCompactionTime" parameter from the configuration.