[GitHub] [flink] ruanhang1993 commented on a diff in pull request #21889: [FLINK-29801][runtime] FLIP-274: Introduce metric group for OperatorCoordinator

2023-02-09 Thread via GitHub


ruanhang1993 commented on code in PR #21889:
URL: https://github.com/apache/flink/pull/21889#discussion_r1102391367


##
flink-core/src/main/java/org/apache/flink/configuration/MetricOptions.java:
##
@@ -272,6 +272,17 @@ public static Configuration forReporter(Configuration 
configuration, String repo
 .withDescription(
 "Defines the scope format string that is applied 
to all metrics scoped to a job on a JobManager. Only effective when a 
identifier-based reporter is configured");
 
+/**
+ * The scope format string that is applied to all metrics scoped to the 
components running on a
+ * JobManager of an operator.
+ */
+public static final ConfigOption SCOPE_NAMING_JM_OPERATOR =
+key("metrics.scope.jm-operator")
+.stringType()
+
.defaultValue(".jobmanager..")

Review Comment:
   I will add the docs about it.



-- 
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: issues-unsubscr...@flink.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [flink] ruanhang1993 commented on a diff in pull request #21889: [FLINK-29801][runtime] FLIP-274: Introduce metric group for OperatorCoordinator

2023-02-09 Thread via GitHub


ruanhang1993 commented on code in PR #21889:
URL: https://github.com/apache/flink/pull/21889#discussion_r1102384957


##
flink-runtime/src/main/java/org/apache/flink/runtime/metrics/groups/InternalOperatorCoordinatorMetricGroup.java:
##
@@ -0,0 +1,33 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.runtime.metrics.groups;
+
+import org.apache.flink.annotation.Internal;
+import org.apache.flink.metrics.MetricGroup;
+import org.apache.flink.metrics.groups.OperatorCoordinatorMetricGroup;
+
+/** Special {@link org.apache.flink.metrics.MetricGroup} representing an 
OperatorCoordinator. */
+@Internal
+public class InternalOperatorCoordinatorMetricGroup extends 
ProxyMetricGroup
+implements OperatorCoordinatorMetricGroup {
+
+public 
InternalOperatorCoordinatorMetricGroup(JobManagerOperatorMetricGroup parent) {

Review Comment:
   I think the InternalOperatorCoordinatorMetricGroup should be only registered 
under the  JobManagerOperatorMetricGroup. So I add this limit. 



-- 
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: issues-unsubscr...@flink.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org