You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by GitBox <gi...@apache.org> on 2020/10/10 02:45:55 UTC
[GitHub] [druid] suneet-s opened a new pull request #10500: Web console: targetRowsPerSegment for hashed partionin
suneet-s opened a new pull request #10500:
URL: https://github.com/apache/druid/pull/10500
Added `targetRowsPerSegment` to the web console for hashed partition for both
the auto compaction view and as part of the ingestion workflow.
The help text was also updated to indicate when a user should care about
updating these fields
<img width="692" alt="Screen Shot 2020-10-09 at 7 42 32 PM" src="https://user-images.githubusercontent.com/44787917/95643986-fa2b8f00-0a67-11eb-9db8-8bc7ac67c746.png">
<img width="500" alt="Screen Shot 2020-10-09 at 7 19 31 PM" src="https://user-images.githubusercontent.com/44787917/95643988-fbf55280-0a67-11eb-8164-e088a4bff63f.png">
<img width="500" alt="Screen Shot 2020-10-09 at 7 19 20 PM" src="https://user-images.githubusercontent.com/44787917/95643989-fc8de900-0a67-11eb-9394-f23e762fad3a.png">
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org
[GitHub] [druid] suneet-s commented on a change in pull request #10500: Web console: targetRowsPerSegment for hashed partionin
Posted by GitBox <gi...@apache.org>.
suneet-s commented on a change in pull request #10500:
URL: https://github.com/apache/druid/pull/10500#discussion_r502839741
##########
File path: web-console/src/utils/ingestion-spec.tsx
##########
@@ -2181,17 +2181,41 @@ export function getPartitionRelatedTuningSpecFormFields(
info: <>Total number of rows in segments waiting for being pushed.</>,
},
// partitionsSpec type: hashed
+ {
+ name: 'partitionsSpec.targetRowsPerSegment',
+ label: 'Target rows per segment',
+ type: 'number',
+ defined: (t: TuningConfig) =>
+ deepGet(t, 'partitionsSpec.type') === 'hashed' &&
+ !deepGet(t, 'partitionsSpec.numShards'),
+ info: (
+ <p>
+ If you have skewed data, you may want to set this field to generate evenly sized
+ segments.
+ <br />
+ <br /> 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.
+ </p>
+ ),
+ },
{
name: 'partitionsSpec.numShards',
label: 'Num shards',
type: 'number',
- defined: (t: TuningConfig) => deepGet(t, 'partitionsSpec.type') === 'hashed',
+ defined: (t: TuningConfig) =>
+ deepGet(t, 'partitionsSpec.type') === 'hashed' &&
+ !deepGet(t, 'partitionsSpec.targetRowsPerSegment'),
Review comment:
That's right, at most one is needed. If both are set, the backend will reject the spec. I forgot to add the validation logic. Will add in the next patch
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org
[GitHub] [druid] suneet-s commented on a change in pull request #10500: Web console: targetRowsPerSegment for hashed partionin
Posted by GitBox <gi...@apache.org>.
suneet-s commented on a change in pull request #10500:
URL: https://github.com/apache/druid/pull/10500#discussion_r502851953
##########
File path: web-console/src/dialogs/compaction-dialog/compaction-dialog.tsx
##########
@@ -74,17 +74,39 @@ const COMPACTION_CONFIG_FIELDS: Field<CompactionConfig>[] = [
info: <>Total number of rows in segments waiting for being pushed.</>,
},
// partitionsSpec type: hashed
+ {
+ name: 'tuningConfig.partitionsSpec.targetRowsPerSegment',
+ label: 'Target rows per segment',
+ type: 'number',
+ defined: (t: CompactionConfig) =>
+ deepGet(t, 'tuningConfig.partitionsSpec.type') === 'hashed' &&
+ !deepGet(t, 'tuningConfig.partitionsSpec.numShards'),
+ info: (
+ <p>
+ If you have skewed data, you may want to set this field to generate evenly sized segments.
+ <br />
+ <br /> 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.
+ </p>
+ ),
+ },
{
name: 'tuningConfig.partitionsSpec.numShards',
label: 'Num shards',
type: 'number',
- defined: (t: CompactionConfig) => deepGet(t, 'tuningConfig.partitionsSpec.type') === 'hashed',
+ defined: (t: CompactionConfig) =>
+ deepGet(t, 'tuningConfig.partitionsSpec.type') === 'hashed' &&
+ !deepGet(t, 'tuningConfig.partitionsSpec.targetRowsPerSegment'),
info: (
- <>
+ <p>
+ If you know the optimal number of shards and want to speed up the time it takes for
+ compaction to run, set this field.
+ <br />
Review comment:
Done
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org
[GitHub] [druid] vogievetsky commented on a change in pull request #10500: Web console: targetRowsPerSegment for hashed partionin
Posted by GitBox <gi...@apache.org>.
vogievetsky commented on a change in pull request #10500:
URL: https://github.com/apache/druid/pull/10500#discussion_r502818534
##########
File path: web-console/src/utils/ingestion-spec.tsx
##########
@@ -2181,17 +2181,41 @@ export function getPartitionRelatedTuningSpecFormFields(
info: <>Total number of rows in segments waiting for being pushed.</>,
},
// partitionsSpec type: hashed
+ {
+ name: 'partitionsSpec.targetRowsPerSegment',
+ label: 'Target rows per segment',
+ type: 'number',
+ defined: (t: TuningConfig) =>
+ deepGet(t, 'partitionsSpec.type') === 'hashed' &&
+ !deepGet(t, 'partitionsSpec.numShards'),
+ info: (
+ <p>
+ If you have skewed data, you may want to set this field to generate evenly sized
+ segments.
+ <br />
+ <br /> 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.
+ </p>
+ ),
+ },
{
name: 'partitionsSpec.numShards',
label: 'Num shards',
type: 'number',
- defined: (t: TuningConfig) => deepGet(t, 'partitionsSpec.type') === 'hashed',
+ defined: (t: TuningConfig) =>
+ deepGet(t, 'partitionsSpec.type') === 'hashed' &&
+ !deepGet(t, 'partitionsSpec.targetRowsPerSegment'),
Review comment:
Does this mean that either `numShards` should be set or `targetRowsPerSegment`? What is their relationship exactly? Does one have to be set? What if both are set? I am asking because it looks like there might need some validation logic?
##########
File path: web-console/src/dialogs/compaction-dialog/compaction-dialog.tsx
##########
@@ -74,17 +74,39 @@ const COMPACTION_CONFIG_FIELDS: Field<CompactionConfig>[] = [
info: <>Total number of rows in segments waiting for being pushed.</>,
},
// partitionsSpec type: hashed
+ {
+ name: 'tuningConfig.partitionsSpec.targetRowsPerSegment',
+ label: 'Target rows per segment',
+ type: 'number',
+ defined: (t: CompactionConfig) =>
+ deepGet(t, 'tuningConfig.partitionsSpec.type') === 'hashed' &&
+ !deepGet(t, 'tuningConfig.partitionsSpec.numShards'),
+ info: (
+ <p>
+ If you have skewed data, you may want to set this field to generate evenly sized segments.
+ <br />
+ <br /> 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.
+ </p>
+ ),
+ },
{
name: 'tuningConfig.partitionsSpec.numShards',
label: 'Num shards',
type: 'number',
- defined: (t: CompactionConfig) => deepGet(t, 'tuningConfig.partitionsSpec.type') === 'hashed',
+ defined: (t: CompactionConfig) =>
+ deepGet(t, 'tuningConfig.partitionsSpec.type') === 'hashed' &&
+ !deepGet(t, 'tuningConfig.partitionsSpec.targetRowsPerSegment'),
info: (
- <>
+ <p>
+ If you know the optimal number of shards and want to speed up the time it takes for
+ compaction to run, set this field.
+ <br />
Review comment:
do not use `<br />` in these descriptions. What you want is paragraphs. You can return multiple paragraphs by wrapping them in a fragment `<>`. So you would want:
```
<>
<p>Paragraph 1</p>
<p>Paragraph 2</p>
</>
```
See https://github.com/apache/druid/blob/cbe2b44e29f1dba0b1882a6afe771cca85083278/web-console/src/utils/ingestion-spec.tsx#L780 for example
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org
[GitHub] [druid] lgtm-com[bot] commented on pull request #10500: Web console: targetRowsPerSegment for hashed partionin
Posted by GitBox <gi...@apache.org>.
lgtm-com[bot] commented on pull request #10500:
URL: https://github.com/apache/druid/pull/10500#issuecomment-706638947
This pull request **introduces 1 alert** when merging 4de618c42925fa3d53ec6925fe85c4ccf4c13984 into 4d2a92f46a121fc8b3f5a02f1480156ccc62bb4a - [view on LGTM.com](https://lgtm.com/projects/g/apache/druid/rev/pr-843dcc345a02fbd191063e8dbbb63685e3a63e2e)
**new alerts:**
* 1 for Identical operands
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org
[GitHub] [druid] vogievetsky merged pull request #10500: Web console: targetRowsPerSegment for hashed partionin
Posted by GitBox <gi...@apache.org>.
vogievetsky merged pull request #10500:
URL: https://github.com/apache/druid/pull/10500
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org