You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hdfs-issues@hadoop.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2023/09/08 14:32:00 UTC
[jira] [Updated] (HDFS-17107) Null Pointer Exception after turned on detail metric for namenode lock
[ https://issues.apache.org/jira/browse/HDFS-17107?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
ASF GitHub Bot updated HDFS-17107:
----------------------------------
Labels: pull-request-available (was: )
> Null Pointer Exception after turned on detail metric for namenode lock
> ----------------------------------------------------------------------
>
> Key: HDFS-17107
> URL: https://issues.apache.org/jira/browse/HDFS-17107
> Project: Hadoop HDFS
> Issue Type: Bug
> Reporter: ConfX
> Priority: Critical
> Labels: pull-request-available
> Attachments: reproduce.sh
>
>
> h2. What happened
> After setting {{{}dfs.namenode.lock.detailed-metrics.enabled=true{}}}, running test {{org.apache.hadoop.hdfs.server.namenode.TestFSNamesystemLock#testFSWriteLockReportSuppressed}} results in a {{{}NullPointerException{}}}.
> h2. Where's the bug
> In class {{{}FSNameSystemLock{}}}:
> {noformat}
> if (metricsEnabled) {
> String opMetric = getMetricName(operationName, isWrite);
> detailedHoldTimeMetrics.add(opMetric, value);{noformat}
> here it may be that the metric is enabled but the detailedHoldTimeMetrics is null.
> h2. How to reproduce
> # Set {{dfs.namenode.lock.detailed-metrics.enabled=true}}
> # Run {{org.apache.hadoop.hdfs.server.namenode.TestFSNamesystemLock#testFSWriteLockReportSuppressed}}
> and the following exception should be observed:
> {noformat}
> java.lang.NullPointerException
> at org.apache.hadoop.hdfs.server.namenode.FSNamesystemLock.addMetric(FSNamesystemLock.java:359)
> at org.apache.hadoop.hdfs.server.namenode.FSNamesystemLock.writeUnlock(FSNamesystemLock.java:287)
> at org.apache.hadoop.hdfs.server.namenode.FSNamesystemLock.writeUnlock(FSNamesystemLock.java:236)
> at org.apache.hadoop.hdfs.server.namenode.TestFSNamesystemLock.testFSWriteLockReportSuppressed(TestFSNamesystemLock.java:433){noformat}
> For an easy reproduction, run the reproduce.sh in the attachment.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-help@hadoop.apache.org