echauchot opened a new pull request #14510:
URL: https://github.com/apache/flink/pull/14510
## What is the purpose of the change
This PR makes sure the configured per-reporter delimiter is filtered out of
the metrics components names.
## Brief change log
- I made the configured reporter delimiter come through to the reporter
instance itself. For this I made a default impl in AbstractReporter.open() that
loads the configured delimiter and I made all the reporters extend
AbstractReporter and I made open() overrides call the default impl. But for
configuration name, I chose to copy the conf string "scope.delimiter" which was
already defined twice in flink-core/ConfigConstants and
flink-core/MetricsOptions rather than making flink-metrics depend on
flink-core. Is that correct ?
- In MetricsOptions, the deprecated "metrics.scope.delimiter" conf name was
in use. I replaced with the new name "scope.delimiter". But I find it weird
that this conf name is duplicated between MetricsOptions and ConfigConstants
- I made a default impl in AbstractReporter.filterCharacter() that filters
out the configured delimiter. I made sure all AbstractReporter subclasses (all
the reporters) and overrides call this default impl.
## Verifying this change
Added AbstractReporterITCase test
## Does this pull request potentially affect one of the following parts:
- Dependencies (does it add or upgrade a dependency): no
- The public API, i.e., is any changed class annotated with
`@Public(Evolving)`: no unless MetricOptions is used publicly (I have fixed a
deprecation in this file)
- The serializers: no
- The runtime per-record code paths (performance sensitive): no
- Anything that affects deployment or recovery: JobManager (and its
components), Checkpointing, Kubernetes/Yarn/Mesos, ZooKeeper: no
- The S3 file system connector: no
## Documentation
Added javadocs on AbstractReporter#open and
AbstractReporter#filterCharacters to document the default impl and recall users
to call super when they override.
----------------------------------------------------------------
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]