snleee commented on a change in pull request #7878:
URL: https://github.com/apache/pinot/pull/7878#discussion_r764411941
##########
File path:
pinot-controller/src/main/java/org/apache/pinot/controller/api/resources/PinotSegmentRestletResource.java
##########
@@ -166,14 +166,16 @@
@ApiOperation(value = "List all segments", notes = "List all segments")
public List<Map<TableType, List<String>>> getSegments(
@ApiParam(value = "Name of the table", required = true)
@PathParam("tableName") String tableName,
- @ApiParam(value = "OFFLINE|REALTIME") @QueryParam("type") String
tableTypeStr) {
+ @ApiParam(value = "OFFLINE|REALTIME") @QueryParam("type") String
tableTypeStr,
+ @ApiParam(value = "Whether live only segments will be returned")
@QueryParam("liveOnly") String liveOnly) {
Review comment:
I think that we need to add more explanation on what does it mean by
`live segments`.
##########
File path:
pinot-controller/src/main/java/org/apache/pinot/controller/helix/core/PinotHelixResourceManager.java
##########
@@ -617,12 +622,21 @@ public String getCrypterClassNameFromTableConfig(String
tableNameWithType) {
}
}
}
+ return retainLiveSegments(tableNameWithType, selectedSegments);
+ }
+
+ /**
+ * Given the list of segment names, retains live segments which are queried.
+ * @param tableNameWithType table name with type
+ * @param segments list of input segment names
+ */
+ private List<String> retainLiveSegments(String tableNameWithType,
List<String> segments) {
Review comment:
`computeLiveSegments`?
--
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]