Michael Smith has uploaded this change for review. ( http://gerrit.cloudera.org:8080/24852
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 6 files changed, 76 insertions(+), 2 deletions(-) git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/52/24852/1 -- 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: newchange Gerrit-Change-Id: Ia3644fb245ceac72e91ed70c8c0392f65df75fde Gerrit-Change-Number: 24852 Gerrit-PatchSet: 1 Gerrit-Owner: Michael Smith <[email protected]>
