hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From waltersu4...@apache.org
Subject hadoop git commit: HDFS-9401. Fix findbugs warnings in BlockRecoveryWorker. Contributed by Brahma Reddy Battula.
Date Tue, 10 Nov 2015 06:55:14 GMT
Repository: hadoop
Updated Branches:
  refs/heads/branch-2 c91bd3aab -> e5420feb0


HDFS-9401. Fix findbugs warnings in BlockRecoveryWorker. Contributed by Brahma Reddy Battula.

(cherry picked from commit 2fda45b9dc9c0bf9bb1380134c80836e89d50471)


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

Branch: refs/heads/branch-2
Commit: e5420feb09ba174a1404e8d55bafe609f8b155e7
Parents: c91bd3a
Author: Walter Su <waltersu4549@apache.org>
Authored: Tue Nov 10 14:48:08 2015 +0800
Committer: Walter Su <waltersu4549@apache.org>
Committed: Tue Nov 10 14:54:04 2015 +0800

----------------------------------------------------------------------
 hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt                   | 3 +++
 .../hadoop-hdfs/dev-support/findbugsExcludeFile.xml           | 7 -------
 .../hadoop/hdfs/server/datanode/BlockRecoveryWorker.java      | 3 ++-
 3 files changed, 5 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/e5420feb/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 e851519..737e03f 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
+++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
@@ -1430,6 +1430,9 @@ Release 2.8.0 - UNRELEASED
     HDFS-9249. NPE is thrown if an IOException is thrown in NameNode constructor.
     (Wei-Chiu Chuang via Yongjun Zhang)
 
+    HDFS-9401. Fix findbugs warnings in BlockRecoveryWorker.
+    (Brahma Reddy Battula via waltersu4549)
+
 Release 2.7.3 - UNRELEASED
 
   INCOMPATIBLE CHANGES

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e5420feb/hadoop-hdfs-project/hadoop-hdfs/dev-support/findbugsExcludeFile.xml
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/dev-support/findbugsExcludeFile.xml b/hadoop-hdfs-project/hadoop-hdfs/dev-support/findbugsExcludeFile.xml
index c88c4c4..3ae8b59 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/dev-support/findbugsExcludeFile.xml
+++ b/hadoop-hdfs-project/hadoop-hdfs/dev-support/findbugsExcludeFile.xml
@@ -124,13 +124,6 @@
        <Bug pattern="DM_EXIT" />
      </Match>
 
-     <!-- Don't complain about recoverBlock equality check -->
-     <Match>
-       <Class name="org.apache.hadoop.hdfs.server.datanode.DataNode" />
-       <Method name="recoverBlock" />
-       <Bug pattern="EC_UNRELATED_TYPES" />
-     </Match>
-
      <!-- More complex cleanup logic confuses findbugs -->
      <Match>
        <Class name="org.apache.hadoop.hdfs.qjournal.server.Journal" />

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e5420feb/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/BlockRecoveryWorker.java
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/BlockRecoveryWorker.java
b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/BlockRecoveryWorker.java
index ae95579..d710021 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/BlockRecoveryWorker.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/BlockRecoveryWorker.java
@@ -112,7 +112,8 @@ public class BlockRecoveryWorker {
       // - Original state is RWR or better
       for(DatanodeID id : locs) {
         try {
-          DatanodeID bpReg =datanode.getBPOfferService(bpid).bpRegistration;
+          DatanodeID bpReg = new DatanodeID(
+              datanode.getBPOfferService(bpid).bpRegistration);
           InterDatanodeProtocol proxyDN = bpReg.equals(id)?
               datanode: DataNode.createInterDataNodeProtocolProxy(id, conf,
               dnConf.socketTimeout, dnConf.connectToDnViaHostname);


Mime
View raw message