RocMarshal commented on code in PR #27446:
URL: https://github.com/apache/flink/pull/27446#discussion_r2713077978
##########
flink-runtime/src/main/java/org/apache/flink/runtime/io/network/api/writer/RecordWriterBuilder.java:
##########
@@ -44,11 +51,26 @@ public RecordWriterBuilder<T> setTaskName(String taskName) {
return this;
}
+ public RecordWriterBuilder<T> setEnabledAdaptivePartitioner(
+ boolean enabledAdaptivePartitioner) {
+ this.enabledAdaptivePartitioner = enabledAdaptivePartitioner;
+ return this;
+ }
+
+ public RecordWriterBuilder<T> setMaxTraverseSize(int maxTraverseSize) {
+ Preconditions.checkState(
+ maxTraverseSize > 1, "The maxTraverseSize must be greater than
1.");
Review Comment:
Moved it before the RecordWriter construction by RecordWriterBuilder.
##########
flink-runtime/src/main/java/org/apache/flink/runtime/io/network/api/writer/RecordWriterBuilder.java:
##########
@@ -44,11 +51,26 @@ public RecordWriterBuilder<T> setTaskName(String taskName) {
return this;
}
+ public RecordWriterBuilder<T> setEnabledAdaptivePartitioner(
+ boolean enabledAdaptivePartitioner) {
+ this.enabledAdaptivePartitioner = enabledAdaptivePartitioner;
+ return this;
+ }
+
+ public RecordWriterBuilder<T> setMaxTraverseSize(int maxTraverseSize) {
+ Preconditions.checkState(
+ maxTraverseSize > 1, "The maxTraverseSize must be greater than
1.");
Review Comment:
IIUC, Because if it is set to 1, this is equivalent to not enabling the
adaptive partition selection feature.
Actively enabling an option that does not even provide theoretical benefits
is generally not acceptable.
Unless the number of downstream partitions is exactly 1.
Pls correct me if I am wrong.
##########
docs/layouts/shortcodes/generated/all_taskmanager_network_section.html:
##########
@@ -8,6 +8,18 @@
</tr>
</thead>
<tbody>
+ <tr>
+ <td><h5>taskmanager.network.adaptive-partitioner.enabled</h5></td>
+ <td style="word-wrap: break-word;">false</td>
+ <td>Boolean</td>
+ <td>Whether to enabled adaptive partitioner feature for rescale
and rebalance partitioners based on the loading of the downstream tasks.</td>
+ </tr>
+ <tr>
+
<td><h5>taskmanager.network.adaptive-partitioner.max-traverse-size</h5></td>
+ <td style="word-wrap: break-word;">4</td>
Review Comment:
the line is the default value description.
##########
docs/layouts/shortcodes/generated/all_taskmanager_network_section.html:
##########
@@ -8,6 +8,18 @@
</tr>
</thead>
<tbody>
+ <tr>
+ <td><h5>taskmanager.network.adaptive-partitioner.enabled</h5></td>
+ <td style="word-wrap: break-word;">false</td>
+ <td>Boolean</td>
+ <td>Whether to enabled adaptive partitioner feature for rescale
and rebalance partitioners based on the loading of the downstream tasks.</td>
+ </tr>
+ <tr>
+
<td><h5>taskmanager.network.adaptive-partitioner.max-traverse-size</h5></td>
+ <td style="word-wrap: break-word;">4</td>
+ <td>Integer</td>
+ <td>How many channels to traverse at most when looking for the
idlest channel for rescale and rebalance partitioners when enabled <code
class="highlighter-rouge">taskmanager.network.adaptive-partitioner.enabled</code>.</td>
Review Comment:
the line 19 is the default value description.
##########
docs/layouts/shortcodes/generated/all_taskmanager_network_section.html:
##########
@@ -8,6 +8,18 @@
</tr>
</thead>
<tbody>
+ <tr>
+ <td><h5>taskmanager.network.adaptive-partitioner.enabled</h5></td>
+ <td style="word-wrap: break-word;">false</td>
+ <td>Boolean</td>
+ <td>Whether to enabled adaptive partitioner feature for rescale
and rebalance partitioners based on the loading of the downstream tasks.</td>
Review Comment:
Thanks, @davidradl
The naming is following the conclusion
[here](https://lists.apache.org/thread/qgtbtoslostlhv614vn2hb06gonoc73h)
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]