Browse Source

HDFS-11766. Fix findbugs warning in branch-2.7. Contributed by Chen Liang.

Akira Ajisaka 8 years ago
parent
commit
6599e57a79

+ 2 - 0
hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt

@@ -263,6 +263,8 @@ Release 2.7.4 - UNRELEASED
     HDFS-11714. Newly added NN storage directory won't get initialized
     and cause space exhaustion. (kihwal)
 
+    HDFS-11766. Fix findbugs warning in branch-2.7. (Chen Liang via aajisaka)
+
 Release 2.7.3 - 2016-08-25
 
   INCOMPATIBLE CHANGES

+ 1 - 1
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSOutputStream.java

@@ -2005,7 +2005,7 @@ public class DFSOutputStream extends FSOutputSummer
    * Used in test only.
    */
   @VisibleForTesting
-  void setBytesCurBlock(final long bytesCurBlock) {
+  synchronized void setBytesCurBlock(final long bytesCurBlock) {
     this.bytesCurBlock = bytesCurBlock;
   }