Class FlinkContainersSettings.Builder
java.lang.Object
org.apache.flink.connector.testframe.container.FlinkContainersSettings.Builder
- Enclosing class:
- FlinkContainersSettings
FlinkContainersConfig builder static inner class.-
Method Summary
Modifier and TypeMethodDescriptionbasedOn(org.apache.flink.configuration.Configuration config) Merges the providedconfigwith the default config, potentially overwriting the defaults in case of collisions.Sets thebaseImageand returns a reference to this Builder enabling method chaining.build()Returns aFlinkContainersConfigbuilt from the parameters previously set.checkpointPath(String checkpointPath) Sets thecheckpointPathand returns a reference to this Builder enabling method chaining.Enables Zookeeper HA.flinkDistLocation(String flinkDistLocation) Sets theflinkDistLocationand returns a reference to this Builder enabling method chaining.Sets the path of the Flink distribution inside the container.fullConfiguration(org.apache.flink.configuration.Configuration config) Sets theflinkConfigurationvalue toconfigand returns a reference to this Builder enabling method chaining.haStoragePath(String haStoragePath) Sets thehaStoragePathand returns a reference to this Builder enabling method chaining.Sets thejarPathsand returns a reference to this Builder enabling method chaining.jarPaths(Collection<String> jarPaths) Sets thejarPathsand returns a reference to this Builder enabling method chaining.jobManagerHostname(String jobManagerHostname) Sets the job manager hostname and returns a reference to this Builder enabling method chaining.numSlotsPerTaskManager(int numSlotsPerTaskManager) Sets thenumSlotsPerTaskManagerand returns a reference to this Builder enabling method chaining.numTaskManagers(int numTaskManagers) Sets thenumTaskManagersand returns a reference to this Builder enabling method chaining.setConfigOption(org.apache.flink.configuration.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.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.taskManagerHostnamePrefix(String taskManagerHostnamePrefix) Sets thetaskManagerHostnamePrefixand returns a reference to this Builder enabling method chaining.zookeeperHostname(String zookeeperHostname) Sets thezookeeperHostnameand returns a reference to this Builder enabling method chaining.
-
Method Details
-
baseImage
Sets thebaseImageand returns a reference to this Builder enabling method chaining.- Parameters:
baseImage- ThebaseImageto set.- Returns:
- A reference to this Builder.
-
flinkDistLocation
Sets theflinkDistLocationand returns a reference to this Builder enabling method chaining.- Parameters:
flinkDistLocation- TheflinkDistLocationto set.- Returns:
- A reference to this Builder.
-
flinkHome
Sets the path of the Flink distribution inside the container. Returns a reference to this Builder enabling method chaining.- Parameters:
flinkHome- TheflinkHometo set.- Returns:
- A reference to this Builder.
-
checkpointPath
Sets thecheckpointPathand returns a reference to this Builder enabling method chaining.- Parameters:
checkpointPath- The checkpoint path to set.- Returns:
- A reference to this Builder.
-
haStoragePath
Sets thehaStoragePathand returns a reference to this Builder enabling method chaining.- Parameters:
haStoragePath- The path for storing HA data.- Returns:
- A reference to this Builder.
-
zookeeperHostname
Sets thezookeeperHostnameand returns a reference to this Builder enabling method chaining.- Parameters:
zookeeperHostname- The Zookeeper hostname.- Returns:
- A reference to this 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 thebasedOn()method instead.- Returns:
- A reference to this Builder.
-
numTaskManagers
Sets thenumTaskManagersand returns a reference to this Builder enabling method chaining.- Parameters:
numTaskManagers- ThenumTaskManagersto set.- Returns:
- A reference to this Builder.
-
numSlotsPerTaskManager
Sets thenumSlotsPerTaskManagerand returns a reference to this Builder enabling method chaining. It also adds this property into theflinkConfigurationfield.- Parameters:
numSlotsPerTaskManager- ThenumSlotsPerTaskManagerto set.- Returns:
- A reference to this Builder.
-
jarPaths
Sets thejarPathsand returns a reference to this Builder enabling method chaining.- Parameters:
jarPaths- ThejarPathsto set.- Returns:
- A reference to this Builder.
-
jarPaths
Sets thejarPathsand returns a reference to this Builder enabling method chaining.- Parameters:
jarPaths- ThejarPathsto set.- Returns:
- A reference to this Builder.
-
setConfigOption
public <T> FlinkContainersSettings.Builder setConfigOption(org.apache.flink.configuration.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
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(org.apache.flink.configuration.Configuration config) Merges the providedconfigwith 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- Theconfigto add.- Returns:
- A reference to this Builder.
-
fullConfiguration
public <T> FlinkContainersSettings.Builder fullConfiguration(org.apache.flink.configuration.Configuration config) Sets theflinkConfigurationvalue toconfigand returns a reference to this Builder enabling method chaining.- Type Parameters:
T- the type parameter- Parameters:
config- Theconfigto set.- Returns:
- A reference to this Builder.
-
taskManagerHostnamePrefix
Sets thetaskManagerHostnamePrefixand returns a reference to this Builder enabling method chaining.- Parameters:
taskManagerHostnamePrefix- ThetaskManagerHostnamePrefixto set.- Returns:
- A reference to this Builder.
-
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
Returns aFlinkContainersConfigbuilt from the parameters previously set.- Returns:
- A
FlinkContainersConfigbuilt with parameters of thisFlinkContainersConfig.Builder.
-