somandal commented on code in PR #15029: URL: https://github.com/apache/pinot/pull/15029#discussion_r1957027728
########## pinot-controller/src/main/java/org/apache/pinot/controller/util/TableMetadataReader.java: ########## @@ -213,4 +220,22 @@ public Map<String, TableStaleSegmentResponse> getStaleSegments(String tableNameW return serverSegmentMetadataReader.getStaleSegmentsFromServer(tableNameWithType, serverInstanceSet, endpoints, timeoutMs); } + + public class TableReloadJsonResponse { Review Comment: My original PR was returning an `ImmutablePair<Integer, List<String>>` for `getCheckReloadSegmentsFromServer`, which is called from `getServerCheckSegmentsReloadMetadata` which converts the `List<String>` to `Map<String, JsonNode>`. So from there I was trying to return an `ImmutablePair<Integer, Map<String, JsonNode>>`. Early review comments from Jackie recommended using classes instead of `ImmutablePair` as the return to ensure the code is more readable. Due to the two different return types, I had to create 2 different classes. I can't make the classes private because the returns are accessed from outside those classes. I'm open to any other ideas if you have any. One idea might be to move the conversion of `List<String>` to `Map<String, JsonNode>` to one of the classes as a function, and call that directly rather than have two different types of returns. wdyt? -- 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: commits-unsubscr...@pinot.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org For additional commands, e-mail: commits-h...@pinot.apache.org