zhtaoxiang commented on code in PR #10412:
URL: https://github.com/apache/pinot/pull/10412#discussion_r1134731059
##########
pinot-controller/src/main/java/org/apache/pinot/controller/api/resources/PinotSegmentRestletResource.java:
##########
@@ -197,16 +197,28 @@ public List<Map<TableType, List<String>>> getSegments(
@ApiParam(value = "OFFLINE|REALTIME") @QueryParam("type") String
tableTypeStr,
@ApiParam(value = "Whether to exclude replaced segments in the response,
which have been replaced"
+ " specified in the segment lineage entries and cannot be queried
from the table")
- @QueryParam("excludeReplacedSegments") String excludeReplacedSegments) {
- List<String> tableNamesWithType = ResourceUtils
- .getExistingTableNamesWithType(_pinotHelixResourceManager, tableName,
Constants.validateTableType(tableTypeStr),
- LOGGER);
+ @QueryParam("excludeReplacedSegments") String excludeReplacedSegments,
+ @ApiParam(value = "Start timestamp (inclusive)")
@QueryParam("startTimestamp") @DefaultValue("")
+ String startTimestampStr,
+ @ApiParam(value = "End timestamp (exclusive)")
@QueryParam("endTimestamp") @DefaultValue("")
+ String endTimestampStr,
+ @ApiParam(value = "Whether to exclude the segments overlapping with the
timestamps, false by default")
+ @QueryParam("excludeOverlapping") @DefaultValue("false") boolean
excludeOverlapping) {
+ long startTimestamp = Strings.isNullOrEmpty(startTimestampStr) ?
Long.MIN_VALUE : Long.parseLong(startTimestampStr);
+ long endTimestamp = Strings.isNullOrEmpty(endTimestampStr) ?
Long.MAX_VALUE : Long.parseLong(endTimestampStr);
Review Comment:
maybe we want to catch `NumberFormatException` and handle it?
--
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]