reswqa commented on code in PR #3032:
URL: https://github.com/apache/celeborn/pull/3032#discussion_r1897589083


##########
client-flink/common/src/main/java/org/apache/celeborn/plugin/flink/metric/RemoteShuffleMetricFactory.java:
##########
@@ -0,0 +1,77 @@
+/*
+ * 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.celeborn.plugin.flink.metric;
+
+import static org.apache.flink.util.Preconditions.checkNotNull;
+
+import org.apache.flink.metrics.MetricGroup;
+import org.apache.flink.runtime.io.network.buffer.NetworkBufferPool;
+
+/** Factory for remote shuffle service metrics. */
+public class RemoteShuffleMetricFactory {
+
+  // shuffle environment level metrics: Shuffle.Remote.*
+
+  private static final String METRIC_TOTAL_MEMORY_SEGMENT = 
"TotalMemorySegments";
+  private static final String METRIC_TOTAL_MEMORY = "TotalMemory";
+
+  private static final String METRIC_AVAILABLE_MEMORY_SEGMENT = 
"AvailableMemorySegments";
+  private static final String METRIC_AVAILABLE_MEMORY = "AvailableMemory";
+
+  private static final String METRIC_USED_MEMORY_SEGMENT = 
"UsedMemorySegments";
+  private static final String METRIC_USED_MEMORY = "UsedMemory";
+
+  // task level metric group structure: Shuffle.Remote.<Input|Output>.Buffers
+
+  private static final String METRIC_GROUP_SHUFFLE = "Shuffle";
+  private static final String METRIC_GROUP_REMOTE = "Remote";
+
+  private RemoteShuffleMetricFactory() {}
+
+  public static void registerShuffleMetrics(
+      MetricGroup metricGroup, NetworkBufferPool networkBufferPool) {
+    checkNotNull(metricGroup);
+    checkNotNull(networkBufferPool);
+
+    //noinspection deprecation

Review Comment:
   which method is deprecated?



##########
client-flink/common/src/main/java/org/apache/celeborn/plugin/flink/metric/RemoteShuffleMetricFactory.java:
##########
@@ -0,0 +1,77 @@
+/*
+ * 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.celeborn.plugin.flink.metric;
+
+import static org.apache.flink.util.Preconditions.checkNotNull;
+
+import org.apache.flink.metrics.MetricGroup;
+import org.apache.flink.runtime.io.network.buffer.NetworkBufferPool;
+
+/** Factory for remote shuffle service metrics. */
+public class RemoteShuffleMetricFactory {
+
+  // shuffle environment level metrics: Shuffle.Remote.*
+
+  private static final String METRIC_TOTAL_MEMORY_SEGMENT = 
"TotalMemorySegments";
+  private static final String METRIC_TOTAL_MEMORY = "TotalMemory";
+
+  private static final String METRIC_AVAILABLE_MEMORY_SEGMENT = 
"AvailableMemorySegments";
+  private static final String METRIC_AVAILABLE_MEMORY = "AvailableMemory";
+
+  private static final String METRIC_USED_MEMORY_SEGMENT = 
"UsedMemorySegments";
+  private static final String METRIC_USED_MEMORY = "UsedMemory";
+
+  // task level metric group structure: Shuffle.Remote.<Input|Output>.Buffers
+
+  private static final String METRIC_GROUP_SHUFFLE = "Shuffle";
+  private static final String METRIC_GROUP_REMOTE = "Remote";
+
+  private RemoteShuffleMetricFactory() {}
+
+  public static void registerShuffleMetrics(
+      MetricGroup metricGroup, NetworkBufferPool networkBufferPool) {
+    checkNotNull(metricGroup);
+    checkNotNull(networkBufferPool);
+
+    //noinspection deprecation
+    internalRegisterShuffleMetrics(metricGroup, networkBufferPool);
+  }
+
+  private static void internalRegisterShuffleMetrics(

Review Comment:
   What's  the reason that we don't want `RequestedMemoryUsage` anymore.



-- 
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]

Reply via email to