adoroszlai commented on code in PR #4369:
URL: https://github.com/apache/ozone/pull/4369#discussion_r1131059856
##########
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/helpers/DatanodeIdYaml.java:
##########
@@ -219,11 +226,31 @@ public void setCurrentVersion(int version) {
}
private static DatanodeDetailsYaml getDatanodeDetailsYaml(
- DatanodeDetails datanodeDetails) {
+ DatanodeDetails datanodeDetails, ConfigurationSource conf)
+ throws IOException {
+
+ DatanodeLayoutStorage datanodeLayoutStorage
+ = new DatanodeLayoutStorage(conf, datanodeDetails.getUuidString());
Map<String, Integer> portDetails = new LinkedHashMap<>();
if (!CollectionUtils.isEmpty(datanodeDetails.getPorts())) {
for (DatanodeDetails.Port port : datanodeDetails.getPorts()) {
+ Field f = null;
+ try {
+ f = port.getName().getClass()
Review Comment:
nit: `port.getName().getClass()` can be a constant
`DatanodeDetails.Port.Name.class`
--
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]