Skip to content

Commit

Permalink
some commit
Browse files Browse the repository at this point in the history
  • Loading branch information
VicoWu committed Sep 20, 2024
1 parent 784f5e3 commit 749a810
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ public LengthInputStream getMetaDataInputStream(ExtendedBlock b)

// The number of volumes required for operation is the total number
// of volumes minus the number of failed volumes we can tolerate.
volFailuresTolerated = datanode.getDnConf().getVolFailuresTolerated();
volFailuresTolerated = datanode.getDnConf().getVolFailuresTolerated(); // The value is 0

Collection<StorageLocation> dataLocations = DataNode.getStorageLocations(conf);
List<VolumeFailureInfo> volumeFailureInfos = getInitialVolumeFailureInfos(
Expand All @@ -312,7 +312,7 @@ public LengthInputStream getMetaDataInputStream(ExtendedBlock b)
volsConfigured = datanode.getDnConf().getVolsConfigured();
int volsFailed = volumeFailureInfos.size();

if (volFailuresTolerated < DataNode.MAX_VOLUME_FAILURE_TOLERATED_LIMIT
if (volFailuresTolerated < DataNode.MAX_VOLUME_FAILURE_TOLERATED_LIMIT // The value is -1
|| volFailuresTolerated >= volsConfigured) {
throw new HadoopIllegalArgumentException("Invalid value configured for "
+ "dfs.datanode.failed.volumes.tolerated - " + volFailuresTolerated
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2169,7 +2169,7 @@ public void testBlockReportSetNoAckBlockToInvalidate() throws Exception {
cluster.setDataNodeDead(datanode.getDatanodeId());
assertFalse(blockManager.containsInvalidateBlock(loc[0], lb.getBlock().getLocalBlock()));

// Wait for re-registration and heartbeat.
// Wait for re, -registration and heartbeat.
datanode.setHeartbeatsDisabledForTests(false);
final DatanodeDescriptor dn1Desc = cluster.getNamesystem(0)
.getBlockManager().getDatanodeManager()
Expand Down

0 comments on commit 749a810

Please sign in to comment.