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 cust-asf.ponee.io (Postfix) with SMTP id EF1B8166B27 for ; Tue, 25 Jul 2017 14:53:04 +0200 (CEST) Received: (qmail 89036 invoked by uid 500); 25 Jul 2017 12:53:04 -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 89025 invoked by uid 99); 25 Jul 2017 12:53:04 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 25 Jul 2017 12:53:04 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 9517B1A084D for ; Tue, 25 Jul 2017 12:53:03 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -100.002 X-Spam-Level: X-Spam-Status: No, score=-100.002 tagged_above=-999 required=6.31 tests=[RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id uZfy0ECe4Lf7 for ; Tue, 25 Jul 2017 12:53:02 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id 085215FC21 for ; Tue, 25 Jul 2017 12:53:02 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 2D09BE0DFD for ; Tue, 25 Jul 2017 12:53:01 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 79E5023F25 for ; Tue, 25 Jul 2017 12:53:00 +0000 (UTC) Date: Tue, 25 Jul 2017 12:53:00 +0000 (UTC) From: "Ray Ruvinskiy (JIRA)" To: issues@flink.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (FLINK-5031) Consecutive DataStream.split() ignored MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/FLINK-5031?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16099981#comment-16099981 ] Ray Ruvinskiy commented on FLINK-5031: -------------------------------------- I have a use case that I'm not sure is covered by side outputs, although perhaps I'm misreading the documentation: selecting multiple tags at once. Currently, each element in my stream has a {{tag}} field; the value of this field is what we split on. We then want to potentially select multiple tags at once, e.g., {code:java} splitStream.select("tag1", "tag2"); {code} Is this this possible with side outputs? > Consecutive DataStream.split() ignored > -------------------------------------- > > Key: FLINK-5031 > URL: https://issues.apache.org/jira/browse/FLINK-5031 > Project: Flink > Issue Type: Bug > Components: DataStream API > Affects Versions: 1.2.0, 1.1.3 > Reporter: Fabian Hueske > Assignee: Renkai Ge > > The output of the following program > {code} > static final class ThresholdSelector implements OutputSelector { > long threshold; > public ThresholdSelector(long threshold) { > this.threshold = threshold; > } > @Override > public Iterable select(Long value) { > if (value < threshold) { > return Collections.singletonList("Less"); > } else { > return Collections.singletonList("GreaterEqual"); > } > } > } > public static void main(String[] args) throws Exception { > StreamExecutionEnvironment env = StreamExecutionEnvironment.getExecutionEnvironment(); > env.setParallelism(1); > SplitStream split1 = env.generateSequence(1, 11) > .split(new ThresholdSelector(6)); > // stream11 should be [1,2,3,4,5] > DataStream stream11 = split1.select("Less"); > SplitStream split2 = stream11 > // .map(new MapFunction() { > // @Override > // public Long map(Long value) throws Exception { > // return value; > // } > // }) > .split(new ThresholdSelector(3)); > DataStream stream21 = split2.select("Less"); > // stream21 should be [1,2] > stream21.print(); > env.execute(); > } > {code} > should be {{1, 2}}, however it is {{1, 2, 3, 4, 5}}. It seems that the second {{split}} operation is ignored. > The program is correctly evaluate if the identity {{MapFunction}} is added to the program. -- This message was sent by Atlassian JIRA (v6.4.14#64029)