errose28 commented on PR #8523:
URL: https://github.com/apache/ozone/pull/8523#issuecomment-2932730854

   Maybe we just do this subset of changes in the PR:
   
   - initialVersion is removed because it is for testing only. Exposing it in 
the Json was a bug.
   - ID and UUID is duplicated four times in various formats. We should have 
one ID string field.
   - IP and hostnames are duplicated. We should have one IP and one hostname 
string field.
   - Ratis and standalone ports are duplicated. Let's keep just the main 
`ports` list intact and remove the `ratisPort` and `standalonePort` fields.
   - Operational state is duplicated as opState and persistedOpState. We can 
pick one and remove the other.
   
   We can leave the following changes to a follow up task since they might need 
more discussion:
   - SCM doesn't populate the value of setupTime, only datanodes set this when 
they start, so it is always 0.
     - I'm not sure whether we want to fix this so SCM is tracking this info 
for each node, or remove the attribute.
   - Level and cost should be moved to a dedicated topology section because the 
terms are ambiguous on their own.
   - Removing port information from list all together and having it only 
present in the proposed `ozone admin datanode info` command.
   
   > Similar comments may be relevant for container list/info --json with 
datanode details.
   
   +1 maybe as part of this change we can delegate to a centralized 
`DatanodeDetails` serializer to handle this. We use a mix of patterns in the 
code currently where sometimes we use Jackson's ObjectMapper to automatically 
build the json from an annotated pojo, and sometimes we build the object from 
scratch. IMO building from scratch is better because we have to "opt-in" to 
adding fields, whereas the object mapper is "opt-out". "opt-in" is safer with 
our compat requirements to not remove fields once they are published.


-- 
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]

Reply via email to