pnowojski commented on a change in pull request #11177: [FLINK-16219][runtime] 
Made AsyncWaitOperator chainable to non-sources.
URL: https://github.com/apache/flink/pull/11177#discussion_r383137052
 
 

 ##########
 File path: 
flink-streaming-java/src/main/java/org/apache/flink/streaming/api/operators/ChainingStrategy.java
 ##########
 @@ -38,16 +38,46 @@
         * <p>To optimize performance, it is generally a good practice to allow 
maximal
         * chaining and increase operator parallelism.
         */
-       ALWAYS,
+       ALWAYS {
+               @Override
+               public boolean canBeChainedTo(StreamOperatorFactory<?> 
headOperator) {
 
 Review comment:
   `headOperator` is a misnomer, as it's not always "head". It's just 
previous/up stream operator.  So at least `headOperator` -> `upStreamOperator` 
? 
   
   However, also maybe optional/subjective, I would expect the call be here 
`head chained with next` instead of `next chained to head`:
   ```
   
headOperator.getChainingStrategy().canBeChainedWith/canBeChainedTo(outOperator)
   ```
   as that's usually how lists/chains are being constructed/traversed - head to 
tail, so maybe:
   ```
   canBeChainedWith(StreamOperatorFactory<?> downStreamOperator)
   ```
   after all?

----------------------------------------------------------------
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]


With regards,
Apache Git Services

Reply via email to