Details
-
Sub-task
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
HDFS-10285
-
None
-
Reviewed
Description
The test case is failing because all the required replicas are not moved in expected storage. This is happened because of delay in datanode registration after cluster restart.
Scenario :
1. Start cluster with 3 DataNodes.
2. Create file and set storage policy to WARM.
3. Restart the cluster.
4. Now Namenode and two DataNodes started first and got registered with NameNode. (one datanode not yet registered)
5. SPS scheduled block movement based on available DataNodes (It will move one replica in ARCHIVE based on policy).
6. Block movement also success and Xattr removed from the file because this condition is true itemInfo.isAllBlockLocsAttemptedToSatisfy().
if (itemInfo != null && !itemInfo.isAllBlockLocsAttemptedToSatisfy()) { blockStorageMovementNeeded .add(storageMovementAttemptedResult.getTrackId()); .................... ...................... } else { .................... ...................... this.sps.postBlkStorageMovementCleanup( storageMovementAttemptedResult.getTrackId()); }
7. Now third DN registered with namenode and its reported one more DISK replica. Now Namenode has two DISK and one ARCHIVE replica.
In test case we have condition to check the number of DISK replica..
DFSTestUtil.waitExpectedStorageType(testFileName, StorageType.DISK, 1, timeout, fs);
This condition never became true and test case will be timed out.