hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ji...@apache.org
Subject hadoop git commit: HDFS-9485. Make BlockManager#removeFromExcessReplicateMap accept BlockInfo instead of Block. Contributed by Mingliang Liu.
Date Tue, 01 Dec 2015 21:12:09 GMT
Repository: hadoop
Updated Branches:
  refs/heads/branch-2.8 81a7ad45c -> 084ad2b42


HDFS-9485. Make BlockManager#removeFromExcessReplicateMap accept BlockInfo instead of Block.
Contributed by Mingliang Liu.

(cherry picked from commit 830eb252aaa4fec7ef2ec38cb66f669e8e1ecaa5)
(cherry picked from commit 7e416aa70d76c39dcbc582d1b5bc4b36f557454e)


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

Branch: refs/heads/branch-2.8
Commit: 084ad2b4201c8b414f67bcef1b404f81cc4d1b9d
Parents: 81a7ad4
Author: Jing Zhao <jing9@apache.org>
Authored: Tue Dec 1 13:05:22 2015 -0800
Committer: Jing Zhao <jing9@apache.org>
Committed: Tue Dec 1 13:10:56 2015 -0800

----------------------------------------------------------------------
 hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt                      | 3 +++
 .../apache/hadoop/hdfs/server/blockmanagement/BlockManager.java  | 4 ++--
 .../org/apache/hadoop/hdfs/server/namenode/FSDirWriteFileOp.java | 2 +-
 3 files changed, 6 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/084ad2b4/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 5c2083f..1242848 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
+++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
@@ -823,6 +823,9 @@ Release 2.8.0 - UNRELEASED
     HDFS-8512. WebHDFS : GETFILESTATUS should return LocatedBlock with storage
     type info. (xyao)
 
+    HDFS-9485. Make BlockManager#removeFromExcessReplicateMap accept BlockInfo
+    instead of Block. (Mingliang Liu via jing9)
+
   OPTIMIZATIONS
 
     HDFS-8026. Trace FSOutputSummer#writeChecksumChunks rather than

http://git-wip-us.apache.org/repos/asf/hadoop/blob/084ad2b4/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/BlockManager.java
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/BlockManager.java
b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/BlockManager.java
index 8efa02f..99e0567 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/BlockManager.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/BlockManager.java
@@ -3569,7 +3569,7 @@ public class BlockManager implements BlockStatsMXBean {
     return corruptReplicas.numCorruptReplicas(block);
   }
 
-  public void removeBlockFromMap(Block block) {
+  public void removeBlockFromMap(BlockInfo block) {
     removeFromExcessReplicateMap(block);
     blocksMap.removeBlock(block);
     // If block is removed from blocksMap remove it from corruptReplicasMap
@@ -3579,7 +3579,7 @@ public class BlockManager implements BlockStatsMXBean {
   /**
    * If a block is removed from blocksMap, remove it from excessReplicateMap.
    */
-  private void removeFromExcessReplicateMap(Block block) {
+  private void removeFromExcessReplicateMap(BlockInfo block) {
     for (DatanodeStorageInfo info : blocksMap.getStorages(block)) {
       String uuid = info.getDatanodeDescriptor().getDatanodeUuid();
       LightWeightHashSet<Block> excessReplicas =

http://git-wip-us.apache.org/repos/asf/hadoop/blob/084ad2b4/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSDirWriteFileOp.java
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSDirWriteFileOp.java
b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSDirWriteFileOp.java
index 20a38be..710a4db 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSDirWriteFileOp.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSDirWriteFileOp.java
@@ -79,7 +79,7 @@ class FSDirWriteFileOp {
     if (uc == null) {
       return false;
     }
-    fsd.getBlockManager().removeBlockFromMap(block);
+    fsd.getBlockManager().removeBlockFromMap(uc);
 
     if(NameNode.stateChangeLog.isDebugEnabled()) {
       NameNode.stateChangeLog.debug("DIR* FSDirectory.removeBlock: "


Mime
View raw message