From issues-return-192971-archive-asf-public=cust-asf.ponee.io@flink.apache.org Tue Oct 9 05:43:35 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 04CCF18067A for ; Tue, 9 Oct 2018 05:43:34 +0200 (CEST) Received: (qmail 35188 invoked by uid 500); 9 Oct 2018 03:43:33 -0000 Mailing-List: contact issues-help@flink.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@flink.apache.org Delivered-To: mailing list issues@flink.apache.org Received: (qmail 35178 invoked by uid 99); 9 Oct 2018 03:43:33 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 09 Oct 2018 03:43:33 +0000 From: GitBox To: issues@flink.apache.org Subject: [GitHub] zhijiangW commented on a change in pull request #6698: [FLINK-8581][network] Move flushing remote subpartitions from OutputFlusher to netty Message-ID: <153905661255.6367.37021627859479605.gitbox@gitbox.apache.org> Date: Tue, 09 Oct 2018 03:43:32 -0000 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit zhijiangW commented on a change in pull request #6698: [FLINK-8581][network] Move flushing remote subpartitions from OutputFlusher to netty URL: https://github.com/apache/flink/pull/6698#discussion_r223553034 ########## File path: flink-runtime/src/main/java/org/apache/flink/runtime/io/network/netty/PartitionRequestQueue.java ########## @@ -354,4 +404,64 @@ public void operationComplete(ChannelFuture future) throws Exception { } } } + + private static class RegisterPeriodicFlushEvent { + private final NetworkSequenceViewReader reader; + private final long flushTimeout; + + public RegisterPeriodicFlushEvent(NetworkSequenceViewReader reader, long flushTimeout) { + this.reader = checkNotNull(reader); + this.flushTimeout = flushTimeout; + } + + public NetworkSequenceViewReader getReader() { + return reader; + } + + public long getFlushTimeout() { + return flushTimeout; + } + } + + private static class PeriodicFlushes { + private final Map> periodicFlushes = new HashMap<>(); + private final Map flushTimeouts = new HashMap<>(); + private final Map> scheduledEvents = new HashMap<>(); + + public void register(ChannelHandlerContext ctx, long flushTimeout, NetworkSequenceViewReader reader) { + checkState(!flushTimeouts.containsKey(reader)); + checkState(flushTimeout > 0); Review comment: If we check the `flushTimeout` at the beginning in `ResultPartition` stack as mentioned above, we need not care about it in the following processes. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: users@infra.apache.org With regards, Apache Git Services