Skip to content

Commit aff0c48

Browse files
author
huhaiyang
committed
1 parent 97e4d50 commit aff0c48

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics2/lib/MutableRollingAverages.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ synchronized void replaceScheduledTask(int windows, long interval,
167167
}
168168

169169
@Override
170-
public void snapshot(MetricsRecordBuilder builder, boolean all) {
170+
public synchronized void snapshot(MetricsRecordBuilder builder, boolean all) {
171171
if (all || changed()) {
172172
for (final Entry<String, LinkedBlockingDeque<SumAndCount>> entry
173173
: averages.entrySet()) {

0 commit comments

Comments
 (0)