[
https://issues.apache.org/jira/browse/HDFS-17107?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18029653#comment-18029653
]
ASF GitHub Bot commented on HDFS-17107:
---------------------------------------
github-actions[bot] commented on PR #6033:
URL: https://github.com/apache/hadoop/pull/6033#issuecomment-3399495434
We're closing this stale PR because it has been open for 100 days with no
activity. This isn't a judgement on the merit of the PR in any way. It's just a
way of keeping the PR queue manageable.
If you feel like this was a mistake, or you would like to continue working
on it, please feel free to re-open it and ask for a committer to remove the
stale tag and review again.
Thanks all for your contribution.
> 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: [email protected]
For additional commands, e-mail: [email protected]