Return-Path: X-Original-To: apmail-crunch-dev-archive@www.apache.org Delivered-To: apmail-crunch-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 94C95176A4 for ; Wed, 8 Apr 2015 19:12:13 +0000 (UTC) Received: (qmail 25502 invoked by uid 500); 8 Apr 2015 19:12:13 -0000 Delivered-To: apmail-crunch-dev-archive@crunch.apache.org Received: (qmail 25460 invoked by uid 500); 8 Apr 2015 19:12:13 -0000 Mailing-List: contact dev-help@crunch.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@crunch.apache.org Delivered-To: mailing list dev@crunch.apache.org Received: (qmail 25448 invoked by uid 500); 8 Apr 2015 19:12:13 -0000 Delivered-To: apmail-incubator-crunch-dev@incubator.apache.org Received: (qmail 25445 invoked by uid 99); 8 Apr 2015 19:12:13 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 08 Apr 2015 19:12:13 +0000 Date: Wed, 8 Apr 2015 19:12:13 +0000 (UTC) From: "Micah Whitacre (JIRA)" To: crunch-dev@incubator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (CRUNCH-510) PCollection.materialize with Spark should use collect() MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 Micah Whitacre created CRUNCH-510: ------------------------------------- Summary: PCollection.materialize with Spark should use collect() Key: CRUNCH-510 URL: https://issues.apache.org/jira/browse/CRUNCH-510 Project: Crunch Issue Type: Improvement Components: Core Reporter: Micah Whitacre Assignee: Josh Wills When troubleshooting some other code noticed that when using the SparkPipeline and the code forces a materialize() to be called... {code} delta = Aggregate.max(scores.parallelDo(new MapFn, Float>() { @Override public Float map(Pair input) { PageRankData prd = input.second(); return Math.abs(prd.score - prd.lastScore); } }, ptf.floats())).getValue(); {code} That the underlying code actually results in writing out the value to HDFS: {noformat} 15/04/08 13:59:33 INFO DAGScheduler: Job 1 finished: saveAsNewAPIHadoopFile at SparkRuntime.java:332, took 0.223622 s {noformat} Since Spark has the method collect() on RDDs, that should accomplish a similar bit of functionality, I wonder if we could switch to use that and cut down on the need to persist it to HDFS. I think this is currently happening because of sharing logic between MRPipeline and SparkPipeline and have no context about how we could possibly break it apart easily. -- This message was sent by Atlassian JIRA (v6.3.4#6332)