Return-Path: X-Original-To: apmail-flink-dev-archive@www.apache.org Delivered-To: apmail-flink-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id C9F4010530 for ; Wed, 25 Jun 2014 14:51:51 +0000 (UTC) Received: (qmail 61761 invoked by uid 500); 25 Jun 2014 14:51:50 -0000 Delivered-To: apmail-flink-dev-archive@flink.apache.org Received: (qmail 61658 invoked by uid 500); 25 Jun 2014 14:51:50 -0000 Mailing-List: contact dev-help@flink.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@flink.incubator.apache.org Delivered-To: mailing list dev@flink.incubator.apache.org Received: (qmail 61312 invoked by uid 99); 25 Jun 2014 14:51:49 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 25 Jun 2014 14:51:49 +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; Wed, 25 Jun 2014 14:51:50 +0000 Received: (qmail 58120 invoked by uid 99); 25 Jun 2014 14:51:25 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 25 Jun 2014 14:51:25 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id F04EB93A814; Wed, 25 Jun 2014 14:51:24 +0000 (UTC) From: markus-h To: dev@flink.incubator.apache.org Reply-To: dev@flink.incubator.apache.org References: In-Reply-To: Subject: [GitHub] incubator-flink pull request: New operator map partition function Content-Type: text/plain Message-Id: <20140625145124.F04EB93A814@tyr.zones.apache.org> Date: Wed, 25 Jun 2014 14:51:24 +0000 (UTC) X-Virus-Checked: Checked by ClamAV on apache.org Github user markus-h commented on a diff in the pull request: https://github.com/apache/incubator-flink/pull/42#discussion_r14190037 --- Diff: stratosphere-compiler/src/main/java/eu/stratosphere/compiler/dag/MapPartitionNode.java --- @@ -0,0 +1,56 @@ +/*********************************************************************************************************************** + * Copyright (C) 2010-2013 by the Stratosphere project (http://stratosphere.eu) + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + **********************************************************************************************************************/ + +package eu.stratosphere.compiler.dag; + +import java.util.Collections; +import java.util.List; + +import eu.stratosphere.api.common.operators.SingleInputOperator; +import eu.stratosphere.compiler.DataStatistics; +import eu.stratosphere.compiler.operators.MapPartitionDescriptor; +import eu.stratosphere.compiler.operators.OperatorDescriptorSingle; + +/** + * The optimizer's internal representation of a MapPartition operator node. + */ +public class MapPartitionNode extends SingleInputNode { + + /** + * Creates a new MapNode for the given contract. + * + * @param operator The map partition contract object. + */ + public MapPartitionNode(SingleInputOperator operator) { + super(operator); + } + + @Override + public String getName() { + return "MapPartition"; + } + + @Override + protected List getPossibleProperties() { + return Collections.singletonList(new MapPartitionDescriptor()); + } + + /** + * Computes the estimates for the MapPartition operator. + * We assume that by default, Map takes one value and transforms it into another value. + * The cardinality consequently stays the same. + */ + @Override + protected void computeOperatorSpecificDefaultEstimates(DataStatistics statistics) { + } --- End diff -- Why did you leave this method empty? I think it should be something similar to the regular map: this.estimatedNumRecords = getPredecessorNode().getEstimatedNumRecords(); --- 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. ---