surekhasaharan commented on a change in pull request #7494: API to drop data by
interval
URL: https://github.com/apache/incubator-druid/pull/7494#discussion_r277111267
##########
File path:
server/src/main/java/org/apache/druid/server/http/DataSourcesResource.java
##########
@@ -700,4 +762,36 @@ static boolean
isSegmentLoaded(Iterable<ImmutableSegmentLoadInfo> serverView, Se
}
return false;
}
+
+ @VisibleForTesting
+ protected static class MarkDatasourceSegmentsPayload
+ {
+ private final Interval interval;
+ private final Set<String> segmentIds;
+
+ @JsonCreator
+ public MarkDatasourceSegmentsPayload(
+ @JsonProperty("interval") Interval interval,
+ @JsonProperty("segmentIds") Set<String> segmentIds
+ )
+ {
+ this.interval = interval;
+ this.segmentIds = segmentIds;
+ }
+
+ public Interval getInterval()
+ {
+ return interval;
+ }
+
+ public Set<String> getSegmentIds()
+ {
+ return segmentIds;
+ }
+
+ public boolean isValid()
Review comment:
oh, actually, if I check in preconditions, the API throws an
`IllegalArgumentException`, but what we want is to return
`Response.Status.BAD_REQUEST`
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]