[
https://issues.apache.org/jira/browse/HDFS-16313?focusedWorklogId=681048&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-681048
]
ASF GitHub Bot logged work on HDFS-16313:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 13/Nov/21 02:33
Start Date: 13/Nov/21 02:33
Worklog Time Spent: 10m
Work Description: symious commented on a change in pull request #3638:
URL: https://github.com/apache/hadoop/pull/3638#discussion_r748670394
##########
File path:
hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/metrics/FederationRPCPerformanceMonitor.java
##########
@@ -181,10 +206,14 @@ public void proxyOpRetries() {
}
@Override
- public void proxyOpNoNamenodes() {
+ public void proxyOpNoNamenodes(String nameservice) {
Review comment:
Updated.
##########
File path:
hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/metrics/NameserviceRPCMetrics.java
##########
@@ -0,0 +1,118 @@
+/**
+ * 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.hadoop.hdfs.server.federation.metrics;
+
+import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.metrics2.MetricsSystem;
+import org.apache.hadoop.metrics2.annotation.Metric;
+import org.apache.hadoop.metrics2.annotation.Metrics;
+import org.apache.hadoop.metrics2.lib.DefaultMetricsSystem;
+import org.apache.hadoop.metrics2.lib.MutableCounterLong;
+import org.apache.hadoop.metrics2.lib.MutableRate;
+
+import java.util.concurrent.ThreadLocalRandom;
+
+/**
+ * Implementation of the Nameservice RPC metrics collector.
+ */
+@Metrics(name = "NameserviceRPCActivity", about = "Nameservice RPC Activity",
+ context = "dfs")
+public class NameserviceRPCMetrics implements NameserviceRPCMBean {
+
+ public final static String NAMESERVICE_RPC_METRICS_PREFIX =
"NameserviceActivity-";
+
+ private final String name;
+
+ @Metric("Time for the Router to proxy an operation to the Nameservice")
+ private MutableRate proxy;
+ @Metric("Number of operations the Router proxied to a NameService")
+ private MutableCounterLong proxyOp;
+
+ @Metric("Number of operations to hit a standby NN")
+ private MutableCounterLong proxyOpFailureStandby;
+ @Metric("Number of operations to fail to reach NN")
+ private MutableCounterLong proxyOpFailureCommunicate;
+ @Metric("Number of operations to hit no namenodes available")
+ private MutableCounterLong proxyOpNoNamenodes;
+
+ public NameserviceRPCMetrics(Configuration conf, String name) {
+ this.name = name;
Review comment:
Updated.
##########
File path:
hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/router/RouterRpcMonitor.java
##########
@@ -62,18 +62,18 @@ void init(
* Mark a proxy operation as completed.
* @param success If the operation was successful.
*/
- void proxyOpComplete(boolean success);
+ void proxyOpComplete(boolean success, String ns);
Review comment:
Updated.
--
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]
Issue Time Tracking
-------------------
Worklog Id: (was: 681048)
Time Spent: 2.5h (was: 2h 20m)
> RBF: Add metrics for each sub cluster
> -------------------------------------
>
> Key: HDFS-16313
> URL: https://issues.apache.org/jira/browse/HDFS-16313
> Project: Hadoop HDFS
> Issue Type: Improvement
> Reporter: Janus Chow
> Assignee: Janus Chow
> Priority: Major
> Labels: pull-request-available
> Time Spent: 2.5h
> Remaining Estimate: 0h
>
> Currently we have metrics to track the operations for Router to all
> nameservices, like "FederationRPCMetrics", but we don't have metrics for
> Router to each nameservices.
> This ticket is to add metrics for each nameservice to better track the
> performance of each sub cluster.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]