-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Web console: support for supervisor based compaction (use new compaction APIs) #17862
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
f386ff0
use new compaction API
vogievetsky cdcbe79
proper dialog
vogievetsky 1d80bfd
minor cleanup
vogievetsky 6759178
try new APIs part 1
vogievetsky 67ad9c7
updated more APIs
vogievetsky 3040636
new APIs
vogievetsky c80545f
final API fixes
vogievetsky 8ea017e
Update web-console/src/druid-models/compaction-dynamic-config/compact…
vogievetsky de086e0
feedback
vogievetsky 1684121
Merge branch 'master' into new_compaction
vogievetsky ede29f0
Merge branch 'master' into new_compaction
vogievetsky ff1c996
use experimental flag instead of label
vogievetsky 29d2e73
move turbo loading to the bottom
vogievetsky File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
97 changes: 97 additions & 0 deletions
97
web-console/src/druid-models/compaction-dynamic-config/compaction-dynamic-config.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,97 @@ | ||
| /* | ||
| * Licensed to the Apache Software Foundation (ASF) under one | ||
| * or more contributor license agreements. See the NOTICE file | ||
| * distributed with this work for additional information | ||
| * regarding copyright ownership. The ASF licenses this file | ||
| * to you under the Apache License, Version 2.0 (the | ||
| * "License"); you may not use this file except in compliance | ||
| * with the License. You may obtain a copy of the License at | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, software | ||
| * distributed under the License is distributed on an "AS IS" BASIS, | ||
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| * See the License for the specific language governing permissions and | ||
| * limitations under the License. | ||
| */ | ||
|
|
||
| import { Code } from '@blueprintjs/core'; | ||
|
|
||
| import type { Field } from '../../components'; | ||
| import { deepGet } from '../../utils'; | ||
|
|
||
| export interface CompactionDynamicConfig { | ||
| compactionTaskSlotRatio: number; | ||
| maxCompactionTaskSlots: number; | ||
| compactionPolicy: { type: 'newestSegmentFirst'; priorityDatasource?: string | null }; | ||
| useSupervisors: boolean; | ||
| engine: 'native' | 'msq'; | ||
| } | ||
|
|
||
| export const COMPACTION_DYNAMIC_CONFIG_DEFAULT_RATIO = 0.1; | ||
| export const COMPACTION_DYNAMIC_CONFIG_DEFAULT_MAX = 2147483647; | ||
| export const COMPACTION_DYNAMIC_CONFIG_FIELDS: Field<CompactionDynamicConfig>[] = [ | ||
| { | ||
| name: 'useSupervisors', | ||
| label: 'Use supervisors', | ||
| experimental: true, | ||
| type: 'boolean', | ||
| defaultValue: false, | ||
| info: ( | ||
| <> | ||
| <p> | ||
| Whether compaction should be run on Overlord using supervisors instead of Coordinator | ||
| duties. | ||
| </p> | ||
| <p>Supervisor based compaction is an experimental feature.</p> | ||
| </> | ||
| ), | ||
| }, | ||
| { | ||
| name: 'engine', | ||
| type: 'string', | ||
| defined: config => Boolean(config.useSupervisors), | ||
| defaultValue: 'native', | ||
| suggestions: ['native', 'msq'], | ||
| info: 'Engine to use for running compaction tasks, native or MSQ.', | ||
| }, | ||
| { | ||
| name: 'compactionTaskSlotRatio', | ||
| type: 'ratio', | ||
| defaultValue: COMPACTION_DYNAMIC_CONFIG_DEFAULT_RATIO, | ||
| info: <>The ratio of the total task slots to the compaction task slots.</>, | ||
| }, | ||
| { | ||
| name: 'maxCompactionTaskSlots', | ||
| type: 'number', | ||
| defaultValue: COMPACTION_DYNAMIC_CONFIG_DEFAULT_MAX, | ||
| info: <>The maximum number of task slots for compaction tasks</>, | ||
| min: 0, | ||
| }, | ||
| { | ||
| name: 'compactionPolicy.type', | ||
| label: 'Compaction search policy', | ||
| type: 'string', | ||
| suggestions: ['newestSegmentFirst'], | ||
| info: ( | ||
| <> | ||
| Currently, the only supported policy is <Code>newestSegmentFirst</Code>, which prioritizes | ||
| segments with more recent intervals for compaction. | ||
| </> | ||
| ), | ||
| }, | ||
| { | ||
| name: 'compactionPolicy.priorityDatasource', | ||
| type: 'string', | ||
| defined: config => deepGet(config, 'compactionPolicy.type') === 'newestSegmentFirst', | ||
| placeholder: '(none)', | ||
| info: ( | ||
| <> | ||
| Datasource to prioritize for compaction. The intervals of this datasource are chosen for | ||
| compaction before the intervals of any other datasource. Within this datasource, the | ||
| intervals are prioritized based on the chosen compaction policy. | ||
| </> | ||
| ), | ||
| }, | ||
| ]; | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we add a label
Compaction search policyfor this? Currently it shows up asType.