From f8059d0bdfbd741b40fff276aaa7f5a4ca633c38 Mon Sep 17 00:00:00 2001 From: Wei-Chiu Chuang Date: Mon, 22 Feb 2021 18:13:06 +0800 Subject: [PATCH] Revert "first commit (#2559)" This reverts commit 1b94569d893ca54ba86ad67340e2e9db27252e0f. --- .../apache/hadoop/hdfs/server/datanode/DirectoryScanner.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 8e331712d4..66cfa01a60 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 @@ -506,7 +506,8 @@ private void scan() { } // Block file and/or metadata file exists on the disk // Block exists in memory - if (info.getBlockFile() == null) { + if (info.getVolume().getStorageType() != StorageType.PROVIDED + && info.getBlockFile() == null) { // Block metadata file exits and block file is missing addDifference(diffRecord, statsRecord, info); } else if (info.getGenStamp() != memBlock.getGenerationStamp()