Skip to content

Commit f4a7c1c

Browse files
committed
Specification comments and method names
1 parent 57ecaed commit f4a7c1c

File tree

1 file changed

+3
-3
lines changed
  • hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement

1 file changed

+3
-3
lines changed

hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/BlockManager.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -2909,7 +2909,7 @@ public boolean processReport(final DatanodeID nodeID,
29092909
+ "discarded non-initial block report from {}"
29102910
+ " because namenode still in startup phase",
29112911
strBlockReportId, fullBrLeaseId, nodeID);
2912-
removeLease(node);
2912+
removeDNLeaseIfNeeded(node);
29132913
return !node.hasStaleStorages();
29142914
}
29152915

@@ -2957,8 +2957,8 @@ public boolean processReport(final DatanodeID nodeID,
29572957
return !node.hasStaleStorages();
29582958
}
29592959

2960-
// Remove the lease when we have received block reports for all storages for a particular DN.
2961-
void removeLease(DatanodeDescriptor node) {
2960+
// Remove the DN lease only when we have received block reports for all storages for a particular DN.
2961+
void removeDNLeaseIfNeeded(DatanodeDescriptor node) {
29622962
boolean needRemoveLease = true;
29632963
for (DatanodeStorageInfo sInfo : node.getStorageInfos()) {
29642964
if (sInfo.getBlockReportCount() == 0) {

0 commit comments

Comments
 (0)