smengcl commented on code in PR #5167:
URL: https://github.com/apache/ozone/pull/5167#discussion_r1289550385
##########
hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/om/helpers/OmKeyLocationInfoGroup.java:
##########
@@ -177,15 +184,11 @@ void addAll(long versionToAdd, List<OmKeyLocationInfo>
locationInfoList) {
@Override
public String toString() {
- StringBuilder sb = new StringBuilder();
- sb.append("version:").append(version).append(" ");
- sb.append("isMultipartKey:").append(isMultipartKey).append(" ");
- for (List<OmKeyLocationInfo> kliList : locationVersionMap.values()) {
- for (OmKeyLocationInfo kli: kliList) {
- sb.append(kli.getLocalID()).append(" || ");
- }
- }
- return sb.toString();
+ return "OmKeyLocationInfoGroup{" +
Review Comment:
It was lacking detailed `locationVersionMap` output (no container ID, no
bcsId). Also not formatted well so I am just using IntelliJ auto-generated
`toString()` to replace it.
AFAIK using `StringBuilder` outside of a big loop should not make too much
of a performance difference nowadays.
I might just restore it but add those interested fields.
--
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]