Skip to content

Commit

Permalink
address review comment - change counter to gauge
Browse files Browse the repository at this point in the history
  • Loading branch information
ceekay committed Mar 7, 2024
1 parent e2aa3ae commit 1f6c4a6
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
import org.apache.hadoop.metrics2.lib.DefaultMetricsSystem;
import org.apache.hadoop.metrics2.lib.MutableCounterInt;
import org.apache.hadoop.metrics2.lib.MutableCounterLong;
import org.apache.hadoop.metrics2.lib.MutableGaugeInt;

/**
* This class is for maintaining Ozone Manager statistics.
Expand Down Expand Up @@ -75,7 +76,7 @@ public class OMMetrics implements OmMetadataReaderMetrics {
private @Metric MutableCounterLong numSnapshotLists;
private @Metric MutableCounterLong numSnapshotDiffJobs;
private @Metric MutableCounterLong numSnapshotInfos;
private @Metric MutableCounterInt numSnapshotCacheSize;
private @Metric MutableGaugeInt numSnapshotCacheSize;
private @Metric MutableCounterLong numGetFileStatus;
private @Metric MutableCounterLong numCreateDirectory;
private @Metric MutableCounterLong numCreateFile;
Expand Down Expand Up @@ -531,7 +532,7 @@ public void incNumSnapshotCacheSize() {
}

public void decNumSnapshotCacheSize() {
numSnapshotCacheSize.incr(-1);
numSnapshotCacheSize.decr();
}

public void incNumCompleteMultipartUploadFails() {
Expand Down

0 comments on commit 1f6c4a6

Please sign in to comment.