[FLINK-39130][metrics] Allow native types in MetricConfig#27642
Conversation
| // -- String values via setProperty (legacy behavior) -- | ||
|
|
||
| @Test | ||
| void testGetIntegerFromString() { |
There was a problem hiding this comment.
I am wondering whether we could have a parameterized test for this. As the tests are basically the same for each native type.
There was a problem hiding this comment.
For defaults and strings, makes sense, will do. For "cross" not sure it is going to be more readable
There was a problem hiding this comment.
Actually, I have tried it out, and for cross it is still more readable, so I made all categories parametrized
183bee7 to
ba37c11
Compare
1996fanrui
left a comment
There was a problem hiding this comment.
Thanks for the fix, IIUC, this is a bug for all 2.x series, right?
If so, would you mind backporting it to all 2.x branch? thanks in advance.
|
@1996fanrui, I am not sure whether it is a "bug". Because MetricConfig was never supporting numbers provided not as strings. If you believe it is beneficial, I can backport it once it is merged |
|
@1996fanrui, actually, I now think you are right and it was a regression in 2.0 since YAML parser was introduced which was able to process native types and not store them as strings. I will convert this subtask into bug and will backport this in previous 2 versions as well once we get this one merged |
Thanks for looking into! Let's leave this open for a while to see if there are any other comments before merging. |
|
@1996fanrui, I have created backport PRs for the last 2 releases: |
What is the purpose of the change
This allows using native types for the MetricConfig. Example usage is for FLIP-553 to allow configuring metric export batch size as: 1500 rather than "1500"
Brief change log
Verifying this change
Does this pull request potentially affect one of the following parts:
@Public(Evolving): (yes / no)Documentation