Class FlinkContainersSettings.Builder

  • Enclosing class:
    FlinkContainersSettings

    public static final class FlinkContainersSettings.Builder
    extends Object
    FlinkContainersConfig builder static inner class.
    • Method Detail

      • baseImage

        public FlinkContainersSettings.Builder baseImage​(String baseImage)
        Sets the baseImage and returns a reference to this Builder enabling method chaining.
        Parameters:
        baseImage - The baseImage to set.
        Returns:
        A reference to this Builder.
      • flinkDistLocation

        public FlinkContainersSettings.Builder flinkDistLocation​(String flinkDistLocation)
        Sets the flinkDistLocation and returns a reference to this Builder enabling method chaining.
        Parameters:
        flinkDistLocation - The flinkDistLocation to set.
        Returns:
        A reference to this Builder.
      • flinkHome

        public FlinkContainersSettings.Builder flinkHome​(String flinkHome)
        Sets the path of the Flink distribution inside the container. Returns a reference to this Builder enabling method chaining.
        Parameters:
        flinkHome - The flinkHome to set.
        Returns:
        A reference to this Builder.
      • checkpointPath

        public FlinkContainersSettings.Builder checkpointPath​(String checkpointPath)
        Sets the checkpointPath and returns a reference to this Builder enabling method chaining.
        Parameters:
        checkpointPath - The checkpoint path to set.
        Returns:
        A reference to this Builder.
      • haStoragePath

        public FlinkContainersSettings.Builder haStoragePath​(String haStoragePath)
        Sets the haStoragePath and returns a reference to this Builder enabling method chaining.
        Parameters:
        haStoragePath - The path for storing HA data.
        Returns:
        A reference to this Builder.
      • zookeeperHostname

        public FlinkContainersSettings.Builder zookeeperHostname​(String zookeeperHostname)
        Sets the zookeeperHostname and returns a reference to this Builder enabling method chaining.
        Parameters:
        zookeeperHostname - The Zookeeper hostname.
        Returns:
        A reference to this Builder.
      • enableZookeeperHA

        public FlinkContainersSettings.Builder enableZookeeperHA()
        Enables Zookeeper HA. NOTE: this option uses default HA configuration. If you want to use non-default configuration, you should provide all settings, including the HA_MODE directly via the basedOn() method instead.
        Returns:
        A reference to this Builder.
      • numTaskManagers

        public FlinkContainersSettings.Builder numTaskManagers​(int numTaskManagers)
        Sets the numTaskManagers and returns a reference to this Builder enabling method chaining.
        Parameters:
        numTaskManagers - The numTaskManagers to set.
        Returns:
        A reference to this Builder.
      • numSlotsPerTaskManager

        public FlinkContainersSettings.Builder numSlotsPerTaskManager​(int numSlotsPerTaskManager)
        Sets the numSlotsPerTaskManager and returns a reference to this Builder enabling method chaining. It also adds this property into the flinkConfiguration field.
        Parameters:
        numSlotsPerTaskManager - The numSlotsPerTaskManager to set.
        Returns:
        A reference to this Builder.
      • jarPaths

        public FlinkContainersSettings.Builder jarPaths​(String... jarPaths)
        Sets the jarPaths and returns a reference to this Builder enabling method chaining.
        Parameters:
        jarPaths - The jarPaths to set.
        Returns:
        A reference to this Builder.
      • jarPaths

        public FlinkContainersSettings.Builder jarPaths​(Collection<String> jarPaths)
        Sets the jarPaths and returns a reference to this Builder enabling method chaining.
        Parameters:
        jarPaths - The jarPaths to set.
        Returns:
        A reference to this Builder.
      • setConfigOption

        public <T> FlinkContainersSettings.Builder setConfigOption​(ConfigOption<T> option,
                                                                   T value)
        Sets a single Flink configuration parameter (the options for config.yaml) and returns a reference to this Builder enabling method chaining.
        Type Parameters:
        T - The type parameter.
        Parameters:
        option - The option.
        value - The value.
        Returns:
        A reference to this Builder.
      • setLogProperty

        public FlinkContainersSettings.Builder setLogProperty​(String key,
                                                              String value)
        Sets a single Flink logging configuration property in the log4j format and returns a reference to this Builder enabling method chaining.
        Parameters:
        key - The property key.
        value - The property value.
        Returns:
        A reference to this Builder.
      • basedOn

        public <T> FlinkContainersSettings.Builder basedOn​(Configuration config)
        Merges the provided config with the default config, potentially overwriting the defaults in case of collisions. Returns a reference to this Builder enabling method chaining.
        Type Parameters:
        T - the type parameter
        Parameters:
        config - The config to add.
        Returns:
        A reference to this Builder.
      • fullConfiguration

        public <T> FlinkContainersSettings.Builder fullConfiguration​(Configuration config)
        Sets the flinkConfiguration value to config and returns a reference to this Builder enabling method chaining.
        Type Parameters:
        T - the type parameter
        Parameters:
        config - The config to set.
        Returns:
        A reference to this Builder.
      • taskManagerHostnamePrefix

        public FlinkContainersSettings.Builder taskManagerHostnamePrefix​(String taskManagerHostnamePrefix)
        Sets the taskManagerHostnamePrefix and returns a reference to this Builder enabling method chaining.
        Parameters:
        taskManagerHostnamePrefix - The taskManagerHostnamePrefix to set.
        Returns:
        A reference to this Builder.
      • jobManagerHostname

        public FlinkContainersSettings.Builder jobManagerHostname​(String jobManagerHostname)
        Sets the job manager hostname and returns a reference to this Builder enabling method chaining.
        Parameters:
        jobManagerHostname - The job manager hostname to set.
        Returns:
        A reference to this Builder.
      • build

        public FlinkContainersSettings build()
        Returns a FlinkContainersConfig built from the parameters previously set.
        Returns:
        A FlinkContainersConfig built with parameters of this FlinkContainersConfig.Builder.