You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flink.apache.org by "Andrey Zagrebin (JIRA)" <ji...@apache.org> on 2019/08/07 15:48:00 UTC

[jira] [Created] (FLINK-13638) Refactor RemoteChannelStateChecker#isProducerConsumerReadyOrAbortConsumption to return result action

Andrey Zagrebin created FLINK-13638:
---------------------------------------

             Summary: Refactor RemoteChannelStateChecker#isProducerConsumerReadyOrAbortConsumption to return result action
                 Key: FLINK-13638
                 URL: https://issues.apache.org/jira/browse/FLINK-13638
             Project: Flink
          Issue Type: Improvement
          Components: Runtime / Network
    Affects Versions: 1.9.0, 1.10.0
            Reporter: Andrey Zagrebin


RemoteChannelStateChecker#isProducerConsumerReadyOrAbortConsumption either triggers some action (fail or cancel) or returns a decision (trigger new partition check or not). It would be more symmetric if this class would not trigger any action but only return a decision what to do:

 
{code:java}
enum Action {
  FAIL(Throwable cause),
  CANCEL(String msg),
  TRIGGER_PARTITION_CHECK, NOOP
}
{code}
 

Then the caller would be responsible for making the action. That way this class would only need access to responseHandle{{.getProducerExecutionState()}} and not responseHandle{{ }}itself.

From PR discussion [https://github.com/apache/flink/pull/8463#discussion_r288290783]



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)