From 88bbc8e9e1124d8fb31b9db8b38077387951ebfd Mon Sep 17 00:00:00 2001 From: andreacyc <90633413+andreacyc@users.noreply.github.com> Date: Tue, 2 Nov 2021 13:03:29 -0400 Subject: [PATCH] Add info for compation config dialog (#11847) * add-info-for-compation-config-dialog * correct the info * remove space typo * Revert "remove space typo" This reverts commit 28b28733ae21dda809b03995e804a65555ff9092. * remove typo space * update snapshots for jest-test --- .../compaction-dialog.spec.tsx.snap | 424 ++++++++++++++++-- .../src/druid-models/compaction-config.tsx | 50 ++- 2 files changed, 435 insertions(+), 39 deletions(-) diff --git a/web-console/src/dialogs/compaction-dialog/__snapshots__/compaction-dialog.spec.tsx.snap b/web-console/src/dialogs/compaction-dialog/__snapshots__/compaction-dialog.spec.tsx.snap index c7e89303c9d..45f015da411 100644 --- a/web-console/src/dialogs/compaction-dialog/__snapshots__/compaction-dialog.spec.tsx.snap +++ b/web-console/src/dialogs/compaction-dialog/__snapshots__/compaction-dialog.spec.tsx.snap @@ -84,6 +84,33 @@ exports[`CompactionDialog matches snapshot with compactionConfig (dynamic partit

A target row count for each partition. Each partition will have a row count close to the target assuming evenly distributed keys. Defaults to 5 million if numShards is null.

+

+ If + + numShards + + is left unspecified, the Parallel task will determine + + + numShards + + automatically by + + targetRowsPerSegment + + . +

+

+ Note that either + + targetRowsPerSegment + + or + + numShards + + will be used to evenly distribute rows and find the best partitioning. Leave blank to show all properties. +

, "name": "tuningConfig.partitionsSpec.targetRowsPerSegment", "placeholder": "(defaults to 500000)", @@ -100,11 +127,37 @@ exports[`CompactionDialog matches snapshot with compactionConfig (dynamic partit maxRowsPerSegment - is an alias for + renamed to targetRowsPerSegment - . Only one of these properties can be used. +

+

+ If + + numShards + + is left unspecified, the Parallel task will determine + + + numShards + + automatically by + + targetRowsPerSegment + + . +

+

+ Note that either + + targetRowsPerSegment + + or + + numShards + + will be used to evenly distribute rows and find the best partitioning. Leave blank to show all properties.

, "name": "tuningConfig.partitionsSpec.maxRowsPerSegment", @@ -120,6 +173,17 @@ exports[`CompactionDialog matches snapshot with compactionConfig (dynamic partit

Directly specify the number of shards to create. If this is specified and 'intervals' is specified in the granularitySpec, the index task can skip the determine intervals/partitions pass through the data.

+

+ Note that either + + targetRowsPerSegment + + or + + numShards + + will be used to evenly distribute rows across partitions and find the best partitioning. Leave blank to show all properties. +

, "name": "tuningConfig.partitionsSpec.numShards", "type": "number", @@ -145,9 +209,22 @@ exports[`CompactionDialog matches snapshot with compactionConfig (dynamic partit }, Object { "defined": [Function], - "info":

- Target number of rows to include in a partition, should be a number that targets segments of 500MB~1GB. -

, + "info": +

+ Target number of rows to include in a partition, should be a number that targets segments of 500MB~1GB. +

+

+ Note that either + + targetRowsPerSegment + + or + + maxRowsPerSegment + + will be used to find the best partitioning. Leave blank to show all properties. +

+
, "name": "tuningConfig.partitionsSpec.targetRowsPerSegment", "required": [Function], "type": "number", @@ -155,9 +232,22 @@ exports[`CompactionDialog matches snapshot with compactionConfig (dynamic partit }, Object { "defined": [Function], - "info":

- Maximum number of rows to include in a partition. -

, + "info": +

+ Maximum number of rows to include in a partition. +

+

+ Note that either + + targetRowsPerSegment + + or + + maxRowsPerSegment + + will be used to find the best partitioning. Leave blank to show all properties. +

+
, "name": "tuningConfig.partitionsSpec.maxRowsPerSegment", "required": [Function], "type": "number", @@ -355,6 +445,33 @@ exports[`CompactionDialog matches snapshot with compactionConfig (hashed partiti

A target row count for each partition. Each partition will have a row count close to the target assuming evenly distributed keys. Defaults to 5 million if numShards is null.

+

+ If + + numShards + + is left unspecified, the Parallel task will determine + + + numShards + + automatically by + + targetRowsPerSegment + + . +

+

+ Note that either + + targetRowsPerSegment + + or + + numShards + + will be used to evenly distribute rows and find the best partitioning. Leave blank to show all properties. +

, "name": "tuningConfig.partitionsSpec.targetRowsPerSegment", "placeholder": "(defaults to 500000)", @@ -371,11 +488,37 @@ exports[`CompactionDialog matches snapshot with compactionConfig (hashed partiti maxRowsPerSegment - is an alias for + renamed to targetRowsPerSegment - . Only one of these properties can be used. +

+

+ If + + numShards + + is left unspecified, the Parallel task will determine + + + numShards + + automatically by + + targetRowsPerSegment + + . +

+

+ Note that either + + targetRowsPerSegment + + or + + numShards + + will be used to evenly distribute rows and find the best partitioning. Leave blank to show all properties.

, "name": "tuningConfig.partitionsSpec.maxRowsPerSegment", @@ -391,6 +534,17 @@ exports[`CompactionDialog matches snapshot with compactionConfig (hashed partiti

Directly specify the number of shards to create. If this is specified and 'intervals' is specified in the granularitySpec, the index task can skip the determine intervals/partitions pass through the data.

+

+ Note that either + + targetRowsPerSegment + + or + + numShards + + will be used to evenly distribute rows across partitions and find the best partitioning. Leave blank to show all properties. +

, "name": "tuningConfig.partitionsSpec.numShards", "type": "number", @@ -416,9 +570,22 @@ exports[`CompactionDialog matches snapshot with compactionConfig (hashed partiti }, Object { "defined": [Function], - "info":

- Target number of rows to include in a partition, should be a number that targets segments of 500MB~1GB. -

, + "info": +

+ Target number of rows to include in a partition, should be a number that targets segments of 500MB~1GB. +

+

+ Note that either + + targetRowsPerSegment + + or + + maxRowsPerSegment + + will be used to find the best partitioning. Leave blank to show all properties. +

+
, "name": "tuningConfig.partitionsSpec.targetRowsPerSegment", "required": [Function], "type": "number", @@ -426,9 +593,22 @@ exports[`CompactionDialog matches snapshot with compactionConfig (hashed partiti }, Object { "defined": [Function], - "info":

- Maximum number of rows to include in a partition. -

, + "info": +

+ Maximum number of rows to include in a partition. +

+

+ Note that either + + targetRowsPerSegment + + or + + maxRowsPerSegment + + will be used to find the best partitioning. Leave blank to show all properties. +

+
, "name": "tuningConfig.partitionsSpec.maxRowsPerSegment", "required": [Function], "type": "number", @@ -626,6 +806,33 @@ exports[`CompactionDialog matches snapshot with compactionConfig (single_dim par

A target row count for each partition. Each partition will have a row count close to the target assuming evenly distributed keys. Defaults to 5 million if numShards is null.

+

+ If + + numShards + + is left unspecified, the Parallel task will determine + + + numShards + + automatically by + + targetRowsPerSegment + + . +

+

+ Note that either + + targetRowsPerSegment + + or + + numShards + + will be used to evenly distribute rows and find the best partitioning. Leave blank to show all properties. +

, "name": "tuningConfig.partitionsSpec.targetRowsPerSegment", "placeholder": "(defaults to 500000)", @@ -642,11 +849,37 @@ exports[`CompactionDialog matches snapshot with compactionConfig (single_dim par maxRowsPerSegment - is an alias for + renamed to targetRowsPerSegment - . Only one of these properties can be used. +

+

+ If + + numShards + + is left unspecified, the Parallel task will determine + + + numShards + + automatically by + + targetRowsPerSegment + + . +

+

+ Note that either + + targetRowsPerSegment + + or + + numShards + + will be used to evenly distribute rows and find the best partitioning. Leave blank to show all properties.

, "name": "tuningConfig.partitionsSpec.maxRowsPerSegment", @@ -662,6 +895,17 @@ exports[`CompactionDialog matches snapshot with compactionConfig (single_dim par

Directly specify the number of shards to create. If this is specified and 'intervals' is specified in the granularitySpec, the index task can skip the determine intervals/partitions pass through the data.

+

+ Note that either + + targetRowsPerSegment + + or + + numShards + + will be used to evenly distribute rows across partitions and find the best partitioning. Leave blank to show all properties. +

, "name": "tuningConfig.partitionsSpec.numShards", "type": "number", @@ -687,9 +931,22 @@ exports[`CompactionDialog matches snapshot with compactionConfig (single_dim par }, Object { "defined": [Function], - "info":

- Target number of rows to include in a partition, should be a number that targets segments of 500MB~1GB. -

, + "info": +

+ Target number of rows to include in a partition, should be a number that targets segments of 500MB~1GB. +

+

+ Note that either + + targetRowsPerSegment + + or + + maxRowsPerSegment + + will be used to find the best partitioning. Leave blank to show all properties. +

+
, "name": "tuningConfig.partitionsSpec.targetRowsPerSegment", "required": [Function], "type": "number", @@ -697,9 +954,22 @@ exports[`CompactionDialog matches snapshot with compactionConfig (single_dim par }, Object { "defined": [Function], - "info":

- Maximum number of rows to include in a partition. -

, + "info": +

+ Maximum number of rows to include in a partition. +

+

+ Note that either + + targetRowsPerSegment + + or + + maxRowsPerSegment + + will be used to find the best partitioning. Leave blank to show all properties. +

+
, "name": "tuningConfig.partitionsSpec.maxRowsPerSegment", "required": [Function], "type": "number", @@ -897,6 +1167,33 @@ exports[`CompactionDialog matches snapshot without compactionConfig 1`] = `

A target row count for each partition. Each partition will have a row count close to the target assuming evenly distributed keys. Defaults to 5 million if numShards is null.

+

+ If + + numShards + + is left unspecified, the Parallel task will determine + + + numShards + + automatically by + + targetRowsPerSegment + + . +

+

+ Note that either + + targetRowsPerSegment + + or + + numShards + + will be used to evenly distribute rows and find the best partitioning. Leave blank to show all properties. +

, "name": "tuningConfig.partitionsSpec.targetRowsPerSegment", "placeholder": "(defaults to 500000)", @@ -913,11 +1210,37 @@ exports[`CompactionDialog matches snapshot without compactionConfig 1`] = ` maxRowsPerSegment - is an alias for + renamed to targetRowsPerSegment - . Only one of these properties can be used. +

+

+ If + + numShards + + is left unspecified, the Parallel task will determine + + + numShards + + automatically by + + targetRowsPerSegment + + . +

+

+ Note that either + + targetRowsPerSegment + + or + + numShards + + will be used to evenly distribute rows and find the best partitioning. Leave blank to show all properties.

, "name": "tuningConfig.partitionsSpec.maxRowsPerSegment", @@ -933,6 +1256,17 @@ exports[`CompactionDialog matches snapshot without compactionConfig 1`] = `

Directly specify the number of shards to create. If this is specified and 'intervals' is specified in the granularitySpec, the index task can skip the determine intervals/partitions pass through the data.

+

+ Note that either + + targetRowsPerSegment + + or + + numShards + + will be used to evenly distribute rows across partitions and find the best partitioning. Leave blank to show all properties. +

, "name": "tuningConfig.partitionsSpec.numShards", "type": "number", @@ -958,9 +1292,22 @@ exports[`CompactionDialog matches snapshot without compactionConfig 1`] = ` }, Object { "defined": [Function], - "info":

- Target number of rows to include in a partition, should be a number that targets segments of 500MB~1GB. -

, + "info": +

+ Target number of rows to include in a partition, should be a number that targets segments of 500MB~1GB. +

+

+ Note that either + + targetRowsPerSegment + + or + + maxRowsPerSegment + + will be used to find the best partitioning. Leave blank to show all properties. +

+
, "name": "tuningConfig.partitionsSpec.targetRowsPerSegment", "required": [Function], "type": "number", @@ -968,9 +1315,22 @@ exports[`CompactionDialog matches snapshot without compactionConfig 1`] = ` }, Object { "defined": [Function], - "info":

- Maximum number of rows to include in a partition. -

, + "info": +

+ Maximum number of rows to include in a partition. +

+

+ Note that either + + targetRowsPerSegment + + or + + maxRowsPerSegment + + will be used to find the best partitioning. Leave blank to show all properties. +

+
, "name": "tuningConfig.partitionsSpec.maxRowsPerSegment", "required": [Function], "type": "number", diff --git a/web-console/src/druid-models/compaction-config.tsx b/web-console/src/druid-models/compaction-config.tsx index e29dffe4a19..171fa05a404 100644 --- a/web-console/src/druid-models/compaction-config.tsx +++ b/web-console/src/druid-models/compaction-config.tsx @@ -85,6 +85,15 @@ export const COMPACTION_CONFIG_FIELDS: Field[] = [ A target row count for each partition. Each partition will have a row count close to the target assuming evenly distributed keys. Defaults to 5 million if numShards is null.

+

+ If numShards is left unspecified, the Parallel task will determine{' '} + numShards automatically by targetRowsPerSegment. +

+

+ Note that either targetRowsPerSegment or numShards will be used + to evenly distribute rows and find the best partitioning. Leave blank to show all + properties. +

), }, @@ -103,8 +112,16 @@ export const COMPACTION_CONFIG_FIELDS: Field[] = [ of 500MB~1GB.

- maxRowsPerSegment is an alias for targetRowsPerSegment. Only one - of these properties can be used. + maxRowsPerSegment renamed to targetRowsPerSegment +

+

+ If numShards is left unspecified, the Parallel task will determine{' '} + numShards automatically by targetRowsPerSegment. +

+

+ Note that either targetRowsPerSegment or numShards will be used + to evenly distribute rows and find the best partitioning. Leave blank to show all + properties.

), @@ -128,6 +145,11 @@ export const COMPACTION_CONFIG_FIELDS: Field[] = [ 'intervals' is specified in the granularitySpec, the index task can skip the determine intervals/partitions pass through the data.

+

+ Note that either targetRowsPerSegment or numShards will be used + to evenly distribute rows across partitions and find the best partitioning. Leave blank to + show all properties. +

), }, @@ -157,10 +179,16 @@ export const COMPACTION_CONFIG_FIELDS: Field[] = [ !deepGet(t, 'tuningConfig.partitionsSpec.targetRowsPerSegment') && !deepGet(t, 'tuningConfig.partitionsSpec.maxRowsPerSegment'), info: ( -

- Target number of rows to include in a partition, should be a number that targets segments of - 500MB~1GB. -

+ <> +

+ Target number of rows to include in a partition, should be a number that targets segments + of 500MB~1GB. +

+

+ Note that either targetRowsPerSegment or maxRowsPerSegment will + be used to find the best partitioning. Leave blank to show all properties. +

+ ), }, { @@ -173,7 +201,15 @@ export const COMPACTION_CONFIG_FIELDS: Field[] = [ required: (t: CompactionConfig) => !deepGet(t, 'tuningConfig.partitionsSpec.targetRowsPerSegment') && !deepGet(t, 'tuningConfig.partitionsSpec.maxRowsPerSegment'), - info:

Maximum number of rows to include in a partition.

, + info: ( + <> +

Maximum number of rows to include in a partition.

+

+ Note that either targetRowsPerSegment or maxRowsPerSegment will + be used to find the best partitioning. Leave blank to show all properties. +

+ + ), }, { name: 'tuningConfig.partitionsSpec.assumeGrouped',