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 "xuzq (Jira)" <ji...@apache.org> on 2021/01/11 11:15:00 UTC
[jira] [Updated] (HDFS-15769) Metric metadataOperationRate maybe
incorrect
[ https://issues.apache.org/jira/browse/HDFS-15769?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
xuzq updated HDFS-15769:
------------------------
Description:
_metadataOperationRate_ maybe incorrect with the wrong latency in _addFileIoError_.
Because _begin_ maybe 0 in _onFailure_ when this FileIo not be sampled.
Code like:
{code:java}
// begin maybe 0 if this FileIo not be sampled.
public void onFailure(@Nullable FsVolumeSpi volume, long begin) {
if (isEnabled) {
DataNodeVolumeMetrics metrics = getVolumeMetrics(volume);
if (metrics != null) {
metrics.addFileIoError(Time.monotonicNow() - begin);
}
}
}
{code}
was:
`metadataOperationRate` maybe incorrect with the wrong latency in `addFileIoError`.
Because `begin` maybe 0 in `onFailure` when this FileIo not be sampled.
Code like:
{code:java}
// begin maybe 0 if this FileIo not be sampled.
public void onFailure(@Nullable FsVolumeSpi volume, long begin) {
if (isEnabled) {
DataNodeVolumeMetrics metrics = getVolumeMetrics(volume);
if (metrics != null) {
metrics.addFileIoError(Time.monotonicNow() - begin);
}
}
}
{code}
> Metric metadataOperationRate maybe incorrect
> --------------------------------------------
>
> Key: HDFS-15769
> URL: https://issues.apache.org/jira/browse/HDFS-15769
> Project: Hadoop HDFS
> Issue Type: Bug
> Reporter: xuzq
> Priority: Major
>
> _metadataOperationRate_ maybe incorrect with the wrong latency in _addFileIoError_.
>
> Because _begin_ maybe 0 in _onFailure_ when this FileIo not be sampled.
>
> Code like:
> {code:java}
> // begin maybe 0 if this FileIo not be sampled.
> public void onFailure(@Nullable FsVolumeSpi volume, long begin) {
> if (isEnabled) {
> DataNodeVolumeMetrics metrics = getVolumeMetrics(volume);
> if (metrics != null) {
> metrics.addFileIoError(Time.monotonicNow() - begin);
> }
> }
> }
> {code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-help@hadoop.apache.org