Return-Path: X-Original-To: apmail-flink-issues-archive@minotaur.apache.org Delivered-To: apmail-flink-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 09BB817A90 for ; Tue, 10 Mar 2015 13:28:14 +0000 (UTC) Received: (qmail 53734 invoked by uid 500); 10 Mar 2015 13:28:14 -0000 Delivered-To: apmail-flink-issues-archive@flink.apache.org Received: (qmail 53689 invoked by uid 500); 10 Mar 2015 13:28:13 -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 53680 invoked by uid 99); 10 Mar 2015 13:28:13 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 10 Mar 2015 13:28:13 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO mail.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with SMTP; Tue, 10 Mar 2015 13:28:12 +0000 Received: (qmail 53621 invoked by uid 99); 10 Mar 2015 13:27:51 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 10 Mar 2015 13:27:51 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id ADDE4E1854; Tue, 10 Mar 2015 13:27:51 +0000 (UTC) From: mxm To: issues@flink.incubator.apache.org Reply-To: issues@flink.incubator.apache.org References: In-Reply-To: Subject: [GitHub] flink pull request: [FLINK-1622][java-api][scala-api] add a partia... Content-Type: text/plain Message-Id: <20150310132751.ADDE4E1854@git1-us-west.apache.org> Date: Tue, 10 Mar 2015 13:27:51 +0000 (UTC) X-Virus-Checked: Checked by ClamAV on apache.org Github user mxm commented on a diff in the pull request: https://github.com/apache/flink/pull/466#discussion_r26120661 --- Diff: flink-java/src/main/java/org/apache/flink/api/java/operators/SortedGrouping.java --- @@ -156,6 +156,23 @@ public SortedGrouping(DataSet set, Keys keys, String field, Order order) { return new GroupReduceOperator(this, resultType, dataSet.clean(reducer), Utils.getCallLocationName() ); } + /** + * Applies a partial GroupReduce transformation on a grouped and sorted {@link DataSet}. + * + * In contrast to the reduceGroup transformation, the GroupReduce function is only called on each partition. Thus, + * partial solutions are likely to occur. + * @param reducer The ReduceFunction that is applied on the DataSet. + * @return A GroupReducePartial operator which represents the partially reduced DataSet. + */ + public GroupReducePartialOperator reduceGroupPartially(GroupReduceFunction reducer) { + if (reducer == null) { + throw new NullPointerException("GroupReduce function must not be null."); + } + TypeInformation resultType = TypeExtractor.getGroupReduceReturnTypes(reducer, this.getDataSet().getType()); + + return new GroupReducePartialOperator(this, resultType, dataSet.clean(reducer), Utils.getCallLocationName()); + } + --- End diff -- We need a grouping to combine the correct values, don't we? Otherwise, we would perform an AllReduce. --- 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 infrastructure@apache.org or file a JIRA ticket with INFRA. ---