druid/docs
zachjsh ab7d9bc6ec
Add api for Retrieving unused segments (#15415)
### Description

This pr adds an api for retrieving unused segments for a particular datasource. The api supports pagination by the addition of `limit` and `lastSegmentId` parameters. The resulting unused segments are returned with optional `sortOrder`, `ASC` or `DESC` with respect to the matching segments `id`, `start time`, and `end time`, or not returned in any guarenteed order if `sortOrder` is not specified

`GET /druid/coordinator/v1/datasources/{dataSourceName}/unusedSegments?interval={interval}&limit={limit}&lastSegmentId={lastSegmentId}&sortOrder={sortOrder}`

Returns a list of unused segments for a datasource in the cluster contained within an optionally specified interval.
Optional parameters for limit and lastSegmentId can be given as well, to limit results and enable paginated results.
The results may be sorted in either ASC, or DESC order depending on specifying the sortOrder parameter.

`dataSourceName`: The name of the datasource
`interval`:                 the specific interval to search for unused segments for.
`limit`:                      the maximum number of unused segments to return information about. This property helps to
                                 support pagination
`lastSegmentId`:     the last segment id from which to search for results. All segments returned are > this segment 
                                 lexigraphically if sortOrder is null or ASC, or < this segment lexigraphically if sortOrder is DESC.
`sortOrder`:            Specifies the order with which to return the matching segments by start time, end time. A null
                                value indicates that order does not matter.

This PR has:

- [x] been self-reviewed.
   - [ ] using the [concurrency checklist](https://github.com/apache/druid/blob/master/dev/code-review/concurrency.md) (Remove this item if the PR doesn't have any relation to concurrency.)
- [x] added documentation for new or modified features or behaviors.
- [ ] a release note entry in the PR description.
- [x] added Javadocs for most classes and all non-trivial methods. Linked related entities via Javadoc links.
- [ ] added or updated version, license, or notice information in [licenses.yaml](https://github.com/apache/druid/blob/master/dev/license.md)
- [x] added comments explaining the "why" and the intent of the code wherever would not be obvious for an unfamiliar reader.
- [x] added unit tests or modified existing tests to cover new code paths, ensuring the threshold for [code coverage](https://github.com/apache/druid/blob/master/dev/code-review/code-coverage.md) is met.
- [ ] added integration tests.
- [x] been tested in a test Druid cluster.
2023-12-11 16:32:18 -05:00
..
_bin De-incubation cleanup in code, docs, packaging (#9108) 2020-01-03 12:33:19 -05:00
api-reference Add api for Retrieving unused segments (#15415) 2023-12-11 16:32:18 -05:00
assets Revamp design page (#15486) 2023-12-08 11:40:24 -08:00
comparisons remove ref to plywood repo (#12809) 2022-07-26 10:12:13 +08:00
configuration Revamp design page (#15486) 2023-12-08 11:40:24 -08:00
data-management Re-arranging sections for append and replace docs. (#15497) 2023-12-06 13:13:05 -08:00
design Clean up duty for non-overlapping eternity tombstones (#15281) 2023-12-11 08:57:15 -08:00
development Revamp design page (#15486) 2023-12-08 11:40:24 -08:00
ingestion Revamp design page (#15486) 2023-12-08 11:40:24 -08:00
misc Update Ingestion section (#14023) 2023-05-19 09:42:27 -07:00
multi-stage-query Doc fixes for query from deep storage and MSQ (#15313) 2023-11-03 10:52:20 +05:30
operations Clean up duty for non-overlapping eternity tombstones (#15281) 2023-12-11 08:57:15 -08:00
querying [Docs] Document decode_base64_complex and decode_base64_utf8 functions (#15444) 2023-12-11 09:12:06 -08:00
release-info [Docs] Add a release notes template (#15333) 2023-12-11 11:35:16 +05:30
tutorials Doc fixes for query from deep storage and MSQ (#15313) 2023-11-03 10:52:20 +05:30