Details
-
Sub-task
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
Heterogeneous Storage (HDFS-2832)
-
None
-
Reviewed
Description
The fields in DatanodeStorageInfo are updated from two distinct paths:
- block reports
- storage reports (via heartbeats)
The state and storageType fields are updated via the Block Report. However, as seen in the code blow, these fields are populated from a "dummy" DatanodeStorage object constructed in the DataNode:
BPServiceActor.blockReport() { //... // Dummy DatanodeStorage object just for sending the block report. DatanodeStorage dnStorage = new DatanodeStorage(storageID); //... }
The net effect is that the state and storageType fields are always the default of NORMAL and DISK in the NameNode.
The recommended fix is to change FsDatasetSpi.getBlockReports() from:
public Map<String, BlockListAsLongs> getBlockReports(String bpid);
to:
public Map<DatanodeStorage, BlockListAsLongs> getBlockReports(String bpid);
thereby allowing BPServiceActor to send the "real" DatanodeStorage object with the block report.
Attachments
Attachments
Issue Links
- is cloned by
-
HDFS-5667 Include DatanodeStorage in StorageReport
- Closed