zentol commented on a change in pull request #15165:
URL: https://github.com/apache/flink/pull/15165#discussion_r593086637
##########
File path:
flink-metrics/flink-metrics-prometheus/src/main/java/org/apache/flink/metrics/prometheus/PrometheusPushGatewayReporter.java
##########
@@ -56,43 +56,42 @@
private boolean deleteOnShutdown;
private Map<String, String> groupingKey;
- @Override
- public void open(MetricConfig config) {
- super.open(config);
-
- String host = config.getString(HOST.key(), HOST.defaultValue());
- int port = config.getInteger(PORT.key(), PORT.defaultValue());
- String configuredJobName = config.getString(JOB_NAME.key(),
JOB_NAME.defaultValue());
- boolean randomSuffix =
- config.getBoolean(
- RANDOM_JOB_NAME_SUFFIX.key(),
RANDOM_JOB_NAME_SUFFIX.defaultValue());
- deleteOnShutdown =
- config.getBoolean(DELETE_ON_SHUTDOWN.key(),
DELETE_ON_SHUTDOWN.defaultValue());
- groupingKey =
- parseGroupingKey(config.getString(GROUPING_KEY.key(),
GROUPING_KEY.defaultValue()));
-
- if (host == null || host.isEmpty() || port < 1) {
+ PrometheusPushGatewayReporter(
+ @Nullable final String hostConfig,
+ @Nullable final int portConfig,
Review comment:
This was only kept in the `JMXReporter` because the `portsConfig`
because it still is a stringified list of port(ranges) like `4,3,123-23`, and
neither `ports` nor `portRanges` seemed appropriate because it does not
necessarily describe the actual value correctly.
----------------------------------------------------------------
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:
[email protected]