hiwangzhihui commented on code in PR #6685:
URL: https://github.com/apache/hadoop/pull/6685#discussion_r1546135795
##########
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/impl/BlockPoolSlice.java:
##########
@@ -749,6 +749,8 @@ void addToReplicasMap(ReplicaMap volumeMap, File dir,
lazyWriteReplicaMap, isFinalized, exceptions, subTaskQueue);
subTask.fork();
subTaskQueue.add(subTask);
+ } else if (isFinalized && ++scanBlockCnt % 10000 == 0) {
+ LOG.info((scanBlockCnt - 1) + " blocks (finalize state) have been
scanned.");
Review Comment:
Please take care of concurrency issues that lead to inaccurate counting.
##########
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/impl/BlockPoolSlice.java:
##########
@@ -749,6 +749,8 @@ void addToReplicasMap(ReplicaMap volumeMap, File dir,
lazyWriteReplicaMap, isFinalized, exceptions, subTaskQueue);
subTask.fork();
subTaskQueue.add(subTask);
+ } else if (isFinalized && ++scanBlockCnt % 10000 == 0) {
+ LOG.info((scanBlockCnt - 1) + " blocks (finalize state) have been
scanned.");
Review Comment:
The log style is not easy to view.
--
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]