Hello Aleksandr Efimov, Zoltan Borok-Nagy, David Rorke, Impala Public Jenkins,
I'd like you to reexamine a change. Please visit
http://gerrit.cloudera.org:8080/24852
to look at the new patch set (#4).
Change subject: IMPALA-15358: Cap Kudu DML writers to hash partition count
......................................................................
IMPALA-15358: Cap Kudu DML writers to hash partition count
For INSERT/UPSERT/UPDATE/DELETE into a partitioned Kudu table, the
planner inserts a KUDU-partitioned exchange ahead of the KuduTableSink.
At runtime, KrpcDataStreamSender routes each row to channel
(partition_index % num_channels), where partition_index is the actual
Kudu tablet index (bounded by the table's tablet count). The writer
fragment's instance count, however, was sized like any other fragment
(mt_dop / cost-based scaling) with no awareness of the target table's
partitioning. Whenever the scheduler assigned more writer instances
than the table has tablets, every instance index >= tablet count never
received rows, causing severe work skew.
Cap the writer fragment's instance count at the table's known Kudu
HASH-bucket count, reusing the existing MAX_FS_WRITERS mechanism
(DmlStatementBase.maxTableSinks_) that HdfsTableSink already relies on.
KuduTableSink now honors the same cap via PlanFragment.getNumNodes()/
getNumInstances(). The cap is only applied when the table has HASH
partitioning, since the number of RANGE partitions can't be determined
without a live Kudu RPC; combined with the user's MAX_FS_WRITERS
setting via min() if both apply.
Change-Id: Ia3644fb245ceac72e91ed70c8c0392f65df75fde
Assisted-by: Claude Sonnet 4.5 (GitHub Copilot)
---
M fe/src/main/java/org/apache/impala/analysis/DmlStatementBase.java
M fe/src/main/java/org/apache/impala/analysis/KuduPartitionParam.java
M fe/src/main/java/org/apache/impala/planner/DistributedPlanner.java
M fe/src/main/java/org/apache/impala/planner/KuduTableSink.java
M fe/src/main/java/org/apache/impala/planner/PlanFragment.java
M fe/src/main/java/org/apache/impala/planner/TableSink.java
M fe/src/test/java/org/apache/impala/planner/PlannerTest.java
M testdata/datasets/functional/functional_schema_template.sql
M testdata/datasets/functional/schema_constraints.csv
A
testdata/workloads/functional-planner/queries/PlannerTest/kudu-insert-writer-limit.test
10 files changed, 264 insertions(+), 2 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/52/24852/4
--
To view, visit http://gerrit.cloudera.org:8080/24852
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ia3644fb245ceac72e91ed70c8c0392f65df75fde
Gerrit-Change-Number: 24852
Gerrit-PatchSet: 4
Gerrit-Owner: Michael Smith <[email protected]>
Gerrit-Reviewer: Aleksandr Efimov <[email protected]>
Gerrit-Reviewer: David Rorke <[email protected]>
Gerrit-Reviewer: Impala Public Jenkins <[email protected]>
Gerrit-Reviewer: Michael Smith <[email protected]>
Gerrit-Reviewer: Zoltan Borok-Nagy <[email protected]>