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:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]