ferhui commented on a change in pull request #3861:
URL: https://github.com/apache/hadoop/pull/3861#discussion_r809627226
##########
File path:
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DirectoryScanner.java
##########
@@ -540,21 +541,30 @@ private void scan() {
m++;
continue;
}
- // Block file and/or metadata file exists on the disk
- // Block exists in memory
- if (info.getBlockFile() == null) {
- // Block metadata file exits and block file is missing
- addDifference(diffRecord, statsRecord, info);
- } else if (info.getGenStamp() != memBlock.getGenerationStamp()
- || info.getBlockLength() != memBlock.getNumBytes()) {
- // Block metadata file is missing or has wrong generation stamp,
- // or block file length is different than expected
+
+ // Block and meta must be regular file
+ boolean isRegular = FileUtil.isRegularFile(info.getBlockFile(), false)
&&
Review comment:
Thanks for your contribution. I have one question here.
As far as i know, many companies use fast copy. It means that some block
files are links.
Does it affect them?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]