Browse Source

HDFS-6014. Fix findbug warnings introduced by HDFS-5583. Contributed by Kihwal Lee.

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/HDFS-5535@1571784 13f79535-47bb-0310-9956-ffa450edef68
Kihwal Lee 11 years ago
parent
commit
f52fe68a2b

+ 2 - 0
hadoop-hdfs-project/hadoop-hdfs/CHANGES_HDFS-5535.txt

@@ -88,3 +88,5 @@ HDFS-5535 subtasks:
 
     HDFS-6003. Add the new -rollingUpgrade startup option to the namenode
     usage message. (Vinayakumar B via szetszwo)
+
+    HDFS-6014. Fix findbug warnings introduced by HDFS-5583. (kihwal)

+ 1 - 0
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/BlockReceiver.java

@@ -1023,6 +1023,7 @@ class BlockReceiver implements Closeable {
       }
 
       synchronized(this) {
+        running = false;
         notifyAll();
       }
     }

+ 2 - 0
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DataNode.java

@@ -1305,6 +1305,8 @@ public class DataNode extends Configured
     }
     LOG.info("Shutdown complete.");
     synchronized(this) {
+      // it is already false, but setting it again to avoid a findbug warning.
+      this.shouldRun = false;
       // Notify the main thread.
       notifyAll();
     }