Github user tillrohrmann commented on a diff in the pull request:

    https://github.com/apache/flink/pull/2550#discussion_r80869838
  
    --- Diff: 
flink-runtime/src/main/java/org/apache/flink/runtime/jobmaster/JobMaster.java 
---
    @@ -467,6 +487,128 @@ public void registerAtResourceManager(final String 
address) {
                //TODO:: register at the RM
        }
     
    +   @RpcMethod
    +   public NextInputSplit requestNextInputSplit(final JobVertexID vertexID, 
final ExecutionAttemptID executionAttempt) {
    --- End diff --
    
    I think both approaches, sending an exception or sending a failure response 
message in case of an exceptionally state on the receiving side, are fine. 
    However, I don't agree that exceptions are only reserved for the rpc layer. 
"User" code should also be allowed to throw exceptions. I agree, though, that 
we have to pay special attention to these cases on the caller-side, because 
there is no compile time check that we actually handle all occurring exceptions.
    All rpc related exceptions are wrapped in a `RpcConnectionException` and 
should, thus, be distinguishable from the "user" code exceptions.
    In this specific case, I would go with throwing exceptions, because they 
transmit more information about the failure reason compared to simply sending 
`null` to the caller.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to