Skip to content
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

Update lookup model in console #15472

Merged
merged 4 commits into from
Dec 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -383,6 +383,33 @@ exports[`LookupEditDialog matches snapshot 1`] = `
],
"type": "duration",
},
Object {
"defaultValue": 0,
"defined": [Function],
"info": "How much jitter to add (in seconds) up to maximum as a delay (actual value will be used as random from 0 to jitterSeconds), used to distribute db load more evenly. Default is 0.",
"name": "extractionNamespace.jitterSeconds",
"required": false,
"suggestions": Array [],
"type": "number",
},
Object {
"defaultValue": 60,
"defined": [Function],
"info": "How much time (in seconds) it can take to query and populate lookup values. It will be helpful in lookup updates. On lookup update, it will wait maximum of \`loadTimeoutSeconds\` for new lookup to come up and continue serving from old lookup until new lookup successfully loads. Default is 60 Sec.",
"name": "extractionNamespace.loadTimeoutSeconds",
"required": false,
"suggestions": Array [],
"type": "number",
},
Object {
"defaultValue": 10,
"defined": [Function],
"info": "The maximum percentage of heap size that the lookup should consume. If the lookup grows beyond this size, warning messages will be logged in the respective service logs. Default is 10 % of jvm size.",
"name": "extractionNamespace.maxHeapPercentage",
"required": false,
"suggestions": Array [],
"type": "number",
},
Object {
"defaultValue": 0,
"defined": [Function],
Expand Down
33 changes: 33 additions & 0 deletions web-console/src/druid-models/lookup-spec/lookup-spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ export interface ExtractionNamespaceSpec {
readonly filter?: any;
readonly tsColumn?: string;
readonly pollPeriod?: number | string;
readonly jitterSeconds?: number;
readonly loadTimeoutSeconds?: number;
readonly maxHeapPercentage?: number;
}

export interface NamespaceParseSpec {
Expand Down Expand Up @@ -458,6 +461,36 @@ export const LOOKUP_FIELDS: Field<LookupSpec>[] = [
required: true,
suggestions: ['PT1M', 'PT10M', 'PT30M', 'PT1H', 'PT6H', 'P1D'],
},
{
name: 'extractionNamespace.jitterSeconds',
type: 'number',
defaultValue: 0,
defined: l =>
oneOfKnown(deepGet(l, 'extractionNamespace.type'), KNOWN_EXTRACTION_NAMESPACE_TYPES, 'jdbc'),
info: 'How much jitter to add (in seconds) up to maximum as a delay (actual value will be used as random from 0 to jitterSeconds), used to distribute db load more evenly. Default is 0.',
required: false,
suggestions: [],
},
{
name: 'extractionNamespace.loadTimeoutSeconds',
type: 'number',
defaultValue: 60,
defined: l =>
oneOfKnown(deepGet(l, 'extractionNamespace.type'), KNOWN_EXTRACTION_NAMESPACE_TYPES, 'jdbc'),
info: 'How much time (in seconds) it can take to query and populate lookup values. It will be helpful in lookup updates. On lookup update, it will wait maximum of `loadTimeoutSeconds` for new lookup to come up and continue serving from old lookup until new lookup successfully loads. Default is 60 Sec.',
required: false,
suggestions: [],
},
{
name: 'extractionNamespace.maxHeapPercentage',
type: 'number',
defaultValue: 10,
defined: l =>
oneOfKnown(deepGet(l, 'extractionNamespace.type'), KNOWN_EXTRACTION_NAMESPACE_TYPES, 'jdbc'),
info: 'The maximum percentage of heap size that the lookup should consume. If the lookup grows beyond this size, warning messages will be logged in the respective service logs. Default is 10 % of jvm size.',
required: false,
suggestions: [],
},

// Extra cachedNamespace things
{
Expand Down