You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2019/06/24 18:04:47 UTC
[GitHub] [flink] Myasuka commented on a change in pull request #8545:
[FLINK-12520] Support to provide fully-qualified domain host name in
TaskManagerMetricGroup
Myasuka commented on a change in pull request #8545: [FLINK-12520] Support to provide fully-qualified domain host name in TaskManagerMetricGroup
URL: https://github.com/apache/flink/pull/8545#discussion_r296847078
##########
File path: flink-core/src/main/java/org/apache/flink/configuration/MetricOptions.java
##########
@@ -185,6 +185,14 @@
"faster updating metrics. Increase this value if the metric fetcher causes too much load. Setting this value to 0 " +
"disables the metric fetching completely.");
+ /**
+ * Whether the host name in task manager metrics should be fully qualified domain name.
+ */
+ public static final ConfigOption<Boolean> METRIC_FULL_HOST_NAME =
+ key("metrics.tm.full-hostname")
Review comment:
@zentol Previously, I thought `<tm_fqdn>` was a good idea. However, after I looked into the code deeper and thought about the actual problem we want to fix. I think the new variable should be `<host_fqdn>`.
There already existed a variable `<host>`, however its real meaning differs on JM and TM side. `<host>` actually means the fully qualified domain name on JM side while it means the first part of fqdn on TM side. We could introduce a new variable `<host_fqdn>` to align its meaning both on JM and TM side.
There still existed another problem if we introduce `<host_fqdn>`. If user happen to configure the `SCOPE_NAMING_TM` as `<host>.<host_fqdn>.taskmanager.<tm_id>` and since we would only pass one `hostName` parameter to `TaskManagerMetricGroup` under the condition that we do not break the API. We have two choices, one is to throw exception when initializing `ScopeFormat` with `<host>` and `<host_fqdn>` both existed. Another is introduing another configure option to control the actual `<host>` meaning which is my PR did. What do you think?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services