hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From whe...@apache.org
Subject hadoop git commit: HDFS-8969. Clean up findbugs warnings for HDFS-8823 and HDFS-8932. Contributed by Anu Engineer.
Date Thu, 27 Aug 2015 20:03:32 GMT
Repository: hadoop
Updated Branches:
  refs/heads/branch-2 7a668981f -> 1b01d163a


HDFS-8969. Clean up findbugs warnings for HDFS-8823 and HDFS-8932. Contributed by Anu Engineer.


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/1b01d163
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/1b01d163
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/1b01d163

Branch: refs/heads/branch-2
Commit: 1b01d163a25d6abdb7b83c1948ca5f67aae49702
Parents: 7a66898
Author: Haohui Mai <wheat9@apache.org>
Authored: Thu Aug 27 13:03:16 2015 -0700
Committer: Haohui Mai <wheat9@apache.org>
Committed: Thu Aug 27 13:03:29 2015 -0700

----------------------------------------------------------------------
 hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt                      | 3 +++
 .../java/org/apache/hadoop/hdfs/server/namenode/FSEditLog.java   | 2 +-
 .../org/apache/hadoop/hdfs/server/namenode/NamenodeFsck.java     | 4 +---
 3 files changed, 5 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/1b01d163/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
index e91b956..a6c0e74 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
+++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
@@ -896,6 +896,9 @@ Release 2.8.0 - UNRELEASED
     HDFS-8961. Investigate lock issue in o.a.h.hdfs.shortcircuit.
     DfsClientShmManager.EndpointShmManager. (Mingliang Liu via wheat9)
 
+    HDFS-8969. Clean up findbugs warnings for HDFS-8823 and HDFS-8932.
+    (Anu Engineer via wheat9)
+
 Release 2.7.2 - UNRELEASED
 
   INCOMPATIBLE CHANGES

http://git-wip-us.apache.org/repos/asf/hadoop/blob/1b01d163/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSEditLog.java
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSEditLog.java
b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSEditLog.java
index d7294d1..61c7df9 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSEditLog.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSEditLog.java
@@ -1651,7 +1651,7 @@ public class FSEditLog implements LogsPurgeable {
    * Return total number of syncs happened on this edit log.
    * @return long - count
    */
-  public long getTotalSyncCount() {
+  public synchronized long getTotalSyncCount() {
     if (editLogStream != null) {
       return editLogStream.getNumSync();
     } else {

http://git-wip-us.apache.org/repos/asf/hadoop/blob/1b01d163/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/NamenodeFsck.java
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/NamenodeFsck.java
b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/NamenodeFsck.java
index a3e74d3..ddb9a3a 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/NamenodeFsck.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/NamenodeFsck.java
@@ -252,9 +252,7 @@ public class NamenodeFsck implements DataEncryptionKeyFactory {
       NumberReplicas numberReplicas= bm.countNodes(blockInfo);
       out.println("Block Id: " + blockId);
       out.println("Block belongs to: "+iNode.getFullPathName());
-      if (blockInfo != null) {
-        out.println("No. of Expected Replica: " + blockInfo.getReplication());
-      }
+      out.println("No. of Expected Replica: " + blockInfo.getReplication());
       out.println("No. of live Replica: " + numberReplicas.liveReplicas());
       out.println("No. of excess Replica: " + numberReplicas.excessReplicas());
       out.println("No. of stale Replica: " +


Mime
View raw message