EndzeitBegins commented on code in PR #9182:
URL: https://github.com/apache/nifi/pull/9182#discussion_r1720031965


##########
nifi-api/src/main/java/org/apache/nifi/processor/ProcessContext.java:
##########
@@ -73,6 +73,15 @@ public interface ProcessContext extends PropertyContext, 
ClusterContext {
      */
     void yield();
 
+    /**
+     * <p>
+     * An alternative name for the yield() method so that it can be called 
from Python.
+     * </p>
+     */
+    default void yieldResources() {

Review Comment:
   Introducing an alias only required by the Python side into the Java codebase 
seems not a good enough reason to me personally. 
   The surface of such a core API should be as narrow as possible I think. 
   
   From what I've gather from other issues, the mailing list and Slack is that 
the Python API is intentionally kept simplistic. I'm not certain the Python API 
should allow yielding explicitly at all. But then again I haven't used the 
Python integration so far. 
   
   I personally thought the original commit was a better approach by making the 
yield implicit and thus enforcing a good practice used widely by `ListX` style 
Java processors. 



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

Reply via email to