|
@@ -2430,7 +2430,7 @@ public class BlockManager implements BlockStatsMXBean {
|
|
|
return providedStorageMap.getCapacity();
|
|
|
}
|
|
|
|
|
|
- public void updateHeartbeat(DatanodeDescriptor node, StorageReport[] reports,
|
|
|
+ void updateHeartbeat(DatanodeDescriptor node, StorageReport[] reports,
|
|
|
long cacheCapacity, long cacheUsed, int xceiverCount, int failedVolumes,
|
|
|
VolumeFailureSummary volumeFailureSummary) {
|
|
|
|
|
@@ -2441,6 +2441,17 @@ public class BlockManager implements BlockStatsMXBean {
|
|
|
failedVolumes, volumeFailureSummary);
|
|
|
}
|
|
|
|
|
|
+ void updateHeartbeatState(DatanodeDescriptor node,
|
|
|
+ StorageReport[] reports, long cacheCapacity, long cacheUsed,
|
|
|
+ int xceiverCount, int failedVolumes,
|
|
|
+ VolumeFailureSummary volumeFailureSummary) {
|
|
|
+ for (StorageReport report: reports) {
|
|
|
+ providedStorageMap.updateStorage(node, report.getStorage());
|
|
|
+ }
|
|
|
+ node.updateHeartbeatState(reports, cacheCapacity, cacheUsed, xceiverCount,
|
|
|
+ failedVolumes, volumeFailureSummary);
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* StatefulBlockInfo is used to build the "toUC" list, which is a list of
|
|
|
* updates to the information about under-construction blocks.
|