You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by we...@apache.org on 2021/02/22 10:35:57 UTC

[hadoop] branch branch-3.3 updated: HDFS-15734. [READ] DirectoryScanner#scan need not check StorageType.PROVIDED (#2559)

This is an automated email from the ASF dual-hosted git repository.

weichiu pushed a commit to branch branch-3.3
in repository https://gitbox.apache.org/repos/asf/hadoop.git


The following commit(s) were added to refs/heads/branch-3.3 by this push:
     new 52a46f0  HDFS-15734. [READ] DirectoryScanner#scan need not check StorageType.PROVIDED (#2559)
52a46f0 is described below

commit 52a46f064a70505034367cffc32dfa1fabc7134b
Author: Wang Yuxuan <60...@qq.com>
AuthorDate: Mon Feb 22 18:10:39 2021 +0800

    HDFS-15734. [READ] DirectoryScanner#scan need not check StorageType.PROVIDED (#2559)
    
    Co-authored-by: wangyuxuan <wa...@xiaomi.com>
    (cherry picked from commit 1e32ab7d2fa83ad4119954b32a3a8daac9d08134)
---
 .../java/org/apache/hadoop/hdfs/server/datanode/DirectoryScanner.java  | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DirectoryScanner.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DirectoryScanner.java
index d835108..be7e47a 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DirectoryScanner.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DirectoryScanner.java
@@ -505,8 +505,7 @@ public class DirectoryScanner implements Runnable {
         }
         // Block file and/or metadata file exists on the disk
         // Block exists in memory
-        if (info.getVolume().getStorageType() != StorageType.PROVIDED
-            && info.getBlockFile() == null) {
+        if (info.getBlockFile() == null) {
           // Block metadata file exits and block file is missing
           addDifference(diffRecord, statsRecord, info);
         } else if (info.getGenStamp() != memBlock.getGenerationStamp()


---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org