druid/website
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
..
script Docusaurus2 upgrade for master (#14411) 2023-08-16 19:01:21 -07:00
src Docusaurus2 upgrade for master (#14411) 2023-08-16 19:01:21 -07:00
static fix: Creating span label not closed (#15323) 2023-11-07 11:01:28 +08:00
.spelling Add api for Retrieving unused segments (#15415) 2023-12-11 16:32:18 -05:00
README.md Docusaurus2 upgrade for master (#14411) 2023-08-16 19:01:21 -07:00
docusaurus.config.js Docusaurus2 upgrade for master (#14411) 2023-08-16 19:01:21 -07:00
package-lock.json docs: update docusaurus 2 stuff (#14864) 2023-09-08 14:19:15 -07:00
package.json docs: update docusaurus 2 stuff (#14864) 2023-09-08 14:19:15 -07:00
redirects.js Revamp design page (#15486) 2023-12-08 11:40:24 -08:00
sidebars.json [Docs] Add a release notes template (#15333) 2023-12-11 11:35:16 +05:30

README.md

Druid doc builder

This website was created with Docusaurus.

To view documentation run:

npm install

Then run:

npm start

The current version of the web site appears in your browser. Edit pages with your favorite editor. Refresh the web page after each edit to review your changes.

Dependencies

  • NodeJS. Use the version Docusaurus specifies, not a newer one. (For example, if 12.x is requested, don't install 16.x.) Docusaurus may require a version newer than that available in your Linux package repository, but older than the latest version. See this page to find the version required by Docusaurus.
  • The Yarn dependency from Docusaurus is optional. (This Yarn is not the Hadoop resource manager, it is a package manager for Node.js).
  • Docusaurus. Installed automatically as part of the the above npm commands.

Variables

Documentation pages can refer to a number of special variables using the {{var}} syntax:

  • DRUIDVERSION - the version of Druid in which the page appears. Allows creating links to files of the same version on GitHub.

The variables are not replaced when running the web site locally using the start command above. They're replaced as part of the process that copies the docs to apache/druid-website-src/.

Spellcheck

Please run a spellcheck before issuing a pull request to avoid a build failure due to spelling issues. Run:

npm run link-lint
npm run spellcheck

If you introduce new (correctly spelled) project names or technical terms, add them to the dictionary in the .spelling file in this directory. Also, terms enclosed in backticks are not spell checked. Example: `symbolName`