ab7d9bc6ec
### 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. |
||
---|---|---|
.. | ||
script | ||
src | ||
static | ||
.spelling | ||
README.md | ||
docusaurus.config.js | ||
package-lock.json | ||
package.json | ||
redirects.js | ||
sidebars.json |
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
`