mayankshriv commented on a change in pull request #6977: URL: https://github.com/apache/incubator-pinot/pull/6977#discussion_r640879901
########## File path: pinot-controller/src/main/java/org/apache/pinot/controller/api/debug/TableDebugInfo.java ########## @@ -102,21 +113,71 @@ public int getNumBrokers() { return _brokerDebugInfos; } + @JsonPropertyOrder({"segmentName", "serverState"}) public static class SegmentDebugInfo { private final String _segmentName; - private final List<IsEvState> _states; - public SegmentDebugInfo(String name, List<IsEvState> states) { - _segmentName = name; - _states = states; + private final Map<String, SegmentState> _serverStateMap; + + @JsonCreator + public SegmentDebugInfo(@JsonProperty("segmentName") String segmentName, + @JsonProperty("serverState") Map<String, SegmentState> segmentServerState) { + _segmentName = segmentName; + _serverStateMap = segmentServerState; } public String getSegmentName() { return _segmentName; } - public List<IsEvState> getSegmentStateInServer() { - return _states; + public Map<String, SegmentState> getServerState() { + return _serverStateMap; + } + } + + /** + * This class represents the state of segment on the server: + * + * <ul> + * <li>Ideal State vs External view.</li> + * <li>Segment related errors and consumer information.</li> + * <li>Segment size.</li> + * </ul> + */ + public static class SegmentState { + private final String _isState; + private final String _evState; + private final String _segmentSize; + private final SegmentConsumerInfo _consumerInfo; + private final SegmentErrorInfo _errorInfo; Review comment: Yes. Not sure if I follow the concern. -- 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. 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