1u0 commented on a change in pull request #7795: [FLINK-11716] Add new config
option for TaskManager automatic address binding
URL: https://github.com/apache/flink/pull/7795#discussion_r258991974
##########
File path:
flink-core/src/main/java/org/apache/flink/configuration/TaskManagerOptions.java
##########
@@ -83,12 +85,27 @@
public static final ConfigOption<String> HOST =
key("taskmanager.host")
.noDefaultValue()
- .withDescription("The hostname of the network interface
that the TaskManager binds to. By default, the" +
- " TaskManager searches for network interfaces
that can connect to the JobManager and other TaskManagers." +
- " This option can be used to define a hostname
if that strategy fails for some reason. Because" +
- " different TaskManagers need different values
for this option, it usually is specified in an" +
+ .withDescription("The address of the network interface
that the TaskManager binds to." +
+ " This option can be used to define explicitly
a binding address. Because" +
+ " different TaskManagers need different values
for this option, usually it is specified in an" +
" additional non-shared TaskManager-specific
config file.");
+ /**
+ * The config parameter for automatically defining the TaskManager's
binding address,
+ * if {@link #HOST} configuration option is not set.
+ */
+ public static final ConfigOption<String> HOST_BIND_POLICY =
+ key("taskmanager.host.bind-policy")
+ .defaultValue("auto-detect-hostname")
+ .withDescription(Description.builder()
+ .text("The automatic address binding policy used by the
TaskManager if \"" + HOST.key() + "\" is not set." +
+ " The value should be one of the following:\n")
+ .list(
+ text("\"hostname\" - uses host's hostname as
binding address"),
+ text("\"ip\" - uses host's ip address as
binding address"),
+ text("\"auto-detect-hostname\" - searches for
network interfaces that can connect to the JobManager"))
Review comment:
I'd like to use the enum here, but this would spoil `flink-core` package or
dependency graph.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services