Skip to content

Commit

Permalink
[FLINK-24474] set default for taskmanager.host
Browse files Browse the repository at this point in the history
  • Loading branch information
niklassemmler authored and XComp committed Mar 3, 2022
1 parent fbfdb0e commit ec25a4d
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 1 deletion.
14 changes: 13 additions & 1 deletion flink-dist/src/main/resources/flink-conf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,26 @@ jobmanager.bind-host: localhost

jobmanager.memory.process.size: 1600m

# The host interface the TaskManager will bind to. My default, this is localhost, and will prevent
# The host interface the TaskManager will bind to. By default, this is localhost, and will prevent
# the TaskManager from communicating outside the machine/container it is running on.
#
# To enable this, set the bind-host address to one that has access to an outside facing network
# interface, such as 0.0.0.0.

taskmanager.bind-host: localhost

# The address of the host on which the TaskManager runs and can be reached by the JobManager and
# other TaskManagers. If not specified, the TaskManager will try different strategies to identify
# the address.
#
# Note this address needs to be reachable by the JobManager and forward traffic to one of
# the interfaces the TaskManager is bound to (see 'taskmanager.bind-host').
#
# Note also that unless all TaskManagers are running on the same machine, this address needs to be
# configured separately for each TaskManager.

taskmanager.host: localhost

# The total process memory size for the TaskManager.
#
# Note this accounts for all memory usage within the TaskManager process, including JVM metaspace and other overhead.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@ public FlinkContainers build() {

this.conf.set(JobManagerOptions.BIND_HOST, "0.0.0.0");
this.conf.set(TaskManagerOptions.BIND_HOST, "0.0.0.0");
this.conf.removeConfig(TaskManagerOptions.HOST);

// Create temporary directory for building Flink image
final Path imageBuildingTempDir;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@ private Map<String, String> getClusterSidePropertiesMap(Configuration flinkConfi
clusterSideConfig.removeConfig(RestOptions.BIND_ADDRESS);
clusterSideConfig.removeConfig(JobManagerOptions.BIND_HOST);
clusterSideConfig.removeConfig(TaskManagerOptions.BIND_HOST);
clusterSideConfig.removeConfig(TaskManagerOptions.HOST);
return clusterSideConfig.toMap();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ public static Configuration loadConfiguration(
configuration.setString(JobManagerOptions.ADDRESS, hostname);
configuration.removeConfig(JobManagerOptions.BIND_HOST);
configuration.removeConfig(TaskManagerOptions.BIND_HOST);
configuration.removeConfig(TaskManagerOptions.HOST);
configuration.setString(RestOptions.ADDRESS, hostname);
configuration.setString(RestOptions.BIND_ADDRESS, hostname);

Expand Down

0 comments on commit ec25a4d

Please sign in to comment.