adding API for retention period on table rest resource#9148
adding API for retention period on table rest resource#9148walterddr merged 2 commits intoapache:masterfrom
Conversation
| @ApiParam(value = "Name of the table to delete", required = true) @PathParam("tableName") String tableName, | ||
| @ApiParam(value = "realtime|offline") @QueryParam("type") String tableTypeStr) { | ||
| @ApiParam(value = "realtime|offline") @QueryParam("type") String tableTypeStr, | ||
| @ApiParam(value = "Retention period for the table segments (e.g. 12h, 3d); Using 0d or -1d will instantly " |
There was a problem hiding this comment.
can you clarify if this retention period on the server or on the deep store?
There was a problem hiding this comment.
Does this retention period in the query override any retention setting at the table or controller config level ? Best to clarify the behavior.
There was a problem hiding this comment.
good idea. see my suggested change below
|
|
||
| @Nullable | ||
| private static Long getRetentionMsFromTableConfig(@Nullable TableConfig tableConfig) { | ||
| public static Long getRetentionMsFromTableConfig(@Nullable TableConfig tableConfig) { |
There was a problem hiding this comment.
yes the util was only used within SegmentDeletionManager but now we need to expose it to not just segment but table utils.
| @ApiParam(value = "Name of the table to delete", required = true) @PathParam("tableName") String tableName, | ||
| @ApiParam(value = "realtime|offline") @QueryParam("type") String tableTypeStr) { | ||
| @ApiParam(value = "realtime|offline") @QueryParam("type") String tableTypeStr, | ||
| @ApiParam(value = "Retention period for the table segments (e.g. 12h, 3d); Using 0d or -1d will instantly " |
There was a problem hiding this comment.
good idea. see my suggested change below
| @ApiParam(value = "Retention period for the table segments (e.g. 12h, 3d); Using 0d or -1d will instantly " | ||
| + "delete segments without retention") @QueryParam("retention") String retentionPeriod) { |
There was a problem hiding this comment.
| @ApiParam(value = "Retention period for the table segments (e.g. 12h, 3d); Using 0d or -1d will instantly " | |
| + "delete segments without retention") @QueryParam("retention") String retentionPeriod) { | |
| @ApiParam(value = "Retention period for the table segments (e.g. 12h, 3d); " | |
| + " If not set, the retention period will default to cluster setting; Using 0d or -1d will instantly " | |
| + "delete segments without retention.") @QueryParam("retention") String retentionPeriod) { |
There was a problem hiding this comment.
What about the retention period specified in the table? :)
Perhaps it's simpler to use a boolean flag for whether they want instant delete or not?
There was a problem hiding this comment.
Retention period on table will not be honored since the table config will be deleted first.
Codecov Report
@@ Coverage Diff @@
## master #9148 +/- ##
=============================================
- Coverage 69.91% 24.97% -44.94%
+ Complexity 4993 53 -4940
=============================================
Files 1844 1836 -8
Lines 97659 97553 -106
Branches 14721 14710 -11
=============================================
- Hits 68280 24367 -43913
- Misses 24610 70802 +46192
+ Partials 4769 2384 -2385
Flags with carried forward coverage won't be shown. Click here to find out more.
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
This fixes #9115