Skip to content

Commit

Permalink
Update lookup model in console (#15472)
Browse files Browse the repository at this point in the history
* Update lookup model in console

* ran prettify

* move Defaults to info

* setting defaultValue and removing placeholder
  • Loading branch information
pranavbhole authored Dec 5, 2023
1 parent ff0e838 commit 82e3c61
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 0 deletions.
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

0 comments on commit 82e3c61

Please sign in to comment.