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 d54d29cc1ac74..156f6ce9fdefe 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 @@ -2957,7 +2957,10 @@ public boolean processReport(final DatanodeID nodeID, return !node.hasStaleStorages(); } - // Remove the DN lease only when we have received block reports for all storages for a particular DN. + /** + * Remove the DN lease only when we have received block reports + * for all storages for a particular DN. + */ void removeDNLeaseIfNeeded(DatanodeDescriptor node) { boolean needRemoveLease = true; for (DatanodeStorageInfo sInfo : node.getStorageInfos()) { diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/TestBlockReportLease.java b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/TestBlockReportLease.java index f772145652a56..e62fea933dd5e 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/TestBlockReportLease.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/TestBlockReportLease.java @@ -324,7 +324,8 @@ public void testFirstIncompleteBlockReport() throws Exception { datanodeStorages[i] = storages[i].getStorage(); StorageBlockReport[] reports = createReports(datanodeStorages, 100); - // The first multiple send once, simulating the failure of the first report, only send successfully once + // The first multiple send once, simulating the failure of the first report, + // only send successfully once if(i == 0){ rpcServer.blockReport(dnRegistration, poolId, reports, brContext); }