shenzhu commented on a change in pull request #16750:
URL: https://github.com/apache/flink/pull/16750#discussion_r685238750
##########
File path:
flink-streaming-java/src/test/java/org/apache/flink/streaming/runtime/tasks/TwoInputStreamTaskTest.java
##########
@@ -473,7 +473,7 @@ public void testOperatorMetricReuse() throws Exception {
@Override
public OperatorMetricGroup getOrAddOperator(
OperatorID operatorID, String name) {
- return new OperatorMetricGroup(
+ return OperatorMetricGroup.createOperatorMetricGroup(
Review comment:
> Let's do it like this instead:
>
> ```
> final TaskMetricGroup taskMetricGroup =
> MetricUtils.createTaskManagerMetricGroup(
> NoOpMetricRegistry.INSTANCE,
> "host",
> ResourceID.generate())
> .addTaskForJob(
> new JobID(),
> "jobname",
> new JobVertexID(),
> new ExecutionAttemptID(),
> "task",
> 0,
> 0))
> ```
>
> The current is exactly the kind of hacks that I want to get rid of.
>
> This way we also won't need `createOperatorMetricGroup`.
Got it, I will update here, thanks!
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]