Class ForStStateBackend

    • Constructor Detail

      • ForStStateBackend

        public ForStStateBackend()
        Creates a new ForStStateBackend for storing state.
    • Method Detail

      • configure

        public ForStStateBackend configure​(ReadableConfig config,
                                           ClassLoader classLoader)
        Creates a copy of this state backend that uses the values defined in the configuration for fields where that were not yet specified in this state backend.
        Specified by:
        configure in interface ConfigurableStateBackend
        Parameters:
        config - The configuration.
        classLoader - The class loader.
        Returns:
        The re-configured variant of the state backend
      • setLocalDbStoragePath

        public void setLocalDbStoragePath​(String path)
        Sets the path where the ForSt local files should be stored on the local file system. Setting this path overrides the default behavior, where the files are stored across the configured temp directories.

        Passing null to this function restores the default behavior, where the configured temp directories will be used.

        Parameters:
        path - The path where the local ForSt database files are stored.
      • setLocalDbStoragePaths

        public void setLocalDbStoragePaths​(String... paths)
        Sets the local directories in which the ForSt database puts some files (like metadata files). These directories do not need to be persistent, they can be ephemeral, meaning that they are lost on a machine failure, because state in ForSt is persisted in checkpoints.

        If nothing is configured, these directories default to the TaskManager's local temporary file directories.

        Each distinct state will be stored in one path, but when the state backend creates multiple states, they will store their files on different paths.

        Passing null to this function restores the default behavior, where the configured temp directories will be used.

        Parameters:
        paths - The paths across which the local ForSt database files will be spread.
      • getLocalDbStoragePaths

        public String[] getLocalDbStoragePaths()
        Gets the configured local DB storage paths, or null, if none were configured.

        Under these directories on the TaskManager, ForSt stores some metadata files. These directories do not need to be persistent, they can be ephermeral, meaning that they are lost on a machine failure, because state in ForSt is persisted in checkpoints.

        If nothing is configured, these directories default to the TaskManager's local temporary file directories.

      • setForStOptions

        public void setForStOptions​(ForStOptionsFactory optionsFactory)
        Sets Options for the ForSt instances. Because the options are not serializable and hold native code references, they must be specified through a factory.

        The options created by the factory here are applied on top of user-configured options from configuration set by configure(ReadableConfig, ClassLoader) with keys in ForStConfigurableOptions.

        Parameters:
        optionsFactory - The options factory that lazily creates the ForSt options.
      • getForStOptions

        @Nullable
        public ForStOptionsFactory getForStOptions()
        Gets Options for the ForSt instances.