[
https://issues.apache.org/jira/browse/HADOOP-18364?focusedWorklogId=796963&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-796963
]
ASF GitHub Bot logged work on HADOOP-18364:
-------------------------------------------
Author: ASF GitHub Bot
Created on: 01/Aug/22 17:09
Start Date: 01/Aug/22 17:09
Worklog Time Spent: 10m
Work Description: xkrogen commented on code in PR #4624:
URL: https://github.com/apache/hadoop/pull/4624#discussion_r934744686
##########
hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/TestDataNodeMetrics.java:
##########
@@ -591,14 +592,24 @@ public Boolean get() {
}
@Test
- public void testNNRpcMetricsWithNonHA() throws IOException {
+ public void testNNRpcMetricsWithNonHA() throws Exception {
Configuration conf = new HdfsConfiguration();
// setting heartbeat interval to 1 hour to prevent bpServiceActor sends
// heartbeat periodically to NN during running test case, and
bpServiceActor
// only sends heartbeat once after startup
conf.setTimeDuration(DFS_HEARTBEAT_INTERVAL_KEY, 1, TimeUnit.HOURS);
MiniDFSCluster cluster = new MiniDFSCluster.Builder(conf).build();
cluster.waitActive();
+ final MBeanServer mbs = ManagementFactory.getPlatformMBeanServer();
Review Comment:
Agreed that this isn't the right place. Actually it seems like enhancing
`TestRPC#testRpcMetrics()` might be the best place? Or if we can't get it to
work there, then I agree `TestNameNodeMetrics` seems better.
Issue Time Tracking
-------------------
Worklog Id: (was: 796963)
Time Spent: 1.5h (was: 1h 20m)
> All method metrics related to the rpc protocol should be initialized
> --------------------------------------------------------------------
>
> Key: HADOOP-18364
> URL: https://issues.apache.org/jira/browse/HADOOP-18364
> Project: Hadoop Common
> Issue Type: Bug
> Reporter: Shuyan Zhang
> Assignee: Shuyan Zhang
> Priority: Major
> Labels: pull-request-available
> Time Spent: 1.5h
> Remaining Estimate: 0h
>
> When an RPC protocol is used, the metric of protocol-related methods should
> be initialized; otherwise, metric information will be incomplete. For
> example, when we call HAServiceProtocol#monitorHealth(), only the metric of
> monitorHealth() are initialized, and the metric of transitionToStandby() are
> still not reported. This incompleteness caused a little trouble for our
> monitoring system.
> The root cause is that the parameter passed by RpcEngine to
> MutableRatesWithAggregation#init(java.lang.Class<?>) is always
> XXXProtocolPB, which is inherited from BlockingInterface and does not
> implement any methods. We should fix this bug.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]