krishan1390 commented on code in PR #18821:
URL: https://github.com/apache/pinot/pull/18821#discussion_r3459297693


##########
pinot-server/src/main/java/org/apache/pinot/server/api/resources/TableTierResource.java:
##########
@@ -102,11 +101,10 @@ public String getTableTiers(@ApiParam(value = "Table name 
with type", required =
     List<SegmentDataManager> segmentDataManagers = 
tableDataManager.acquireAllSegments();
     try {
       for (SegmentDataManager segmentDataManager : segmentDataManagers) {
-        if (segmentDataManager instanceof ImmutableSegmentDataManager) {
-          ImmutableSegment immutableSegment = (ImmutableSegment) 
segmentDataManager.getSegment();
-          segmentTiers.put(immutableSegment.getSegmentName(), 
immutableSegment.getTier());
-        } else {
+        if (segmentDataManager instanceof RealtimeSegmentDataManager) {

Review Comment:
   yes. It is a change in behaviour but I think its a more correct behaviour 
now. and don't see a case where it will lead to a regression



##########
pinot-server/src/main/java/org/apache/pinot/server/api/resources/TableTierResource.java:
##########
@@ -102,11 +101,10 @@ public String getTableTiers(@ApiParam(value = "Table name 
with type", required =
     List<SegmentDataManager> segmentDataManagers = 
tableDataManager.acquireAllSegments();
     try {
       for (SegmentDataManager segmentDataManager : segmentDataManagers) {
-        if (segmentDataManager instanceof ImmutableSegmentDataManager) {
-          ImmutableSegment immutableSegment = (ImmutableSegment) 
segmentDataManager.getSegment();
-          segmentTiers.put(immutableSegment.getSegmentName(), 
immutableSegment.getTier());
-        } else {
+        if (segmentDataManager instanceof RealtimeSegmentDataManager) {

Review Comment:
   the return value needs to be keyed by the name of the SegmentDataManager. So 
we can't use getReportableSegments



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