ChenSammi commented on code in PR #5391:
URL: https://github.com/apache/ozone/pull/5391#discussion_r1471394263
##########
hadoop-hdds/interface-server/src/main/proto/ScmServerProtocol.proto:
##########
@@ -230,6 +233,60 @@ message SortDatanodesResponseProto{
repeated DatanodeDetailsProto node = 1;
}
+message NodeImpl {
+ required string name = 1;
+ required string location = 2;
+ required uint32 cost = 3;
+}
+
+message CommandCount {
+ required SCMCommandProto.Type command = 1;
+ required uint32 count = 2;
+}
+
+message NodeStatus {
+ required NodeOperationalState operationalState = 1;
+ required NodeState health = 2;
+ required uint64 opStateExpiryEpochSeconds = 3;
+}
+
+message DatanodeInfo {
+ required DatanodeDetailsProto datanodeDetails = 1;
+ required uint64 lastHeartbeatTime = 2;
+ required uint64 lastStatsUpdatedTime = 3;
+ required uint32 failedVolumeCount = 4;
+ repeated StorageReportProto storageReportProto = 5;
+ repeated MetadataStorageReportProto metadataStorageReportProto = 6;
+ required LayoutVersionProto layoutVersionProto = 7;
+ repeated CommandCount commandCount = 8;
+ required NodeStatus nodeStatus = 9;
+}
+
+message NodeType {
+ optional DatanodeDetailsProto datanodeDetails = 1;
+ optional DatanodeInfo datanodeInfo = 2;
Review Comment:
Currently, only DatanodeDetails is used in the childrenMap. So you can try
to simplify the new protos as
```
message InnerNode {
required NodeImpl node = 1;
required uint32 numOfLeaves = 2;
repeated ChildrenInfo children = 3;
}
message NodeType {
optional DatanodeDetailsProto datanodeDetails = 1;
}
message ChildrenInfo {
required string networkName = 1;
required NodeType nodeType = 2;
}
```
BTW, you missed level and parent in NodeImpl, which are both very
important, especially parent. The topology tree is bi-direction linked.
Without the parent link, the distance calculation cannot be done.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]