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 9D0B01880E for ; Wed, 30 Sep 2015 20:51:04 +0000 (UTC) Received: (qmail 4981 invoked by uid 500); 30 Sep 2015 20:51:04 -0000 Delivered-To: apmail-crunch-dev-archive@crunch.apache.org Received: (qmail 4940 invoked by uid 500); 30 Sep 2015 20:51:04 -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 4929 invoked by uid 500); 30 Sep 2015 20:51:04 -0000 Delivered-To: apmail-incubator-crunch-dev@incubator.apache.org Received: (qmail 4926 invoked by uid 99); 30 Sep 2015 20:51:04 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 30 Sep 2015 20:51:04 +0000 Date: Wed, 30 Sep 2015 20:51:04 +0000 (UTC) From: "Nithin Asokan (JIRA)" To: crunch-dev@incubator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (CRUNCH-566) SparkPipeline done() should wait for all jobs to complete before closing SparkContext 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/CRUNCH-566?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Nithin Asokan updated CRUNCH-566: --------------------------------- Summary: SparkPipeline done() should wait for all jobs to complete before closing SparkContext (was: SparkPipeline done() should wait for all jobs to complete) > SparkPipeline done() should wait for all jobs to complete before closing SparkContext > ------------------------------------------------------------------------------------- > > Key: CRUNCH-566 > URL: https://issues.apache.org/jira/browse/CRUNCH-566 > Project: Crunch > Issue Type: Bug > Components: Spark > Affects Versions: 0.12.0 > Reporter: Nithin Asokan > > {{SparkPipeline#done()}} should consider waiting for all Spark jobs to complete before shutting down a {{SparkContext}}. > Here is an example that fails > {code} > Pipeline pipeline = new SparkPipeline(sparkConnect, "ParallelAction", getClass(), getConf()); > IdentityFn fn = IdentityFn.getInstance(); > pipeline.read(From.avroFile(input1, Student.class)).parallelDo(fn, Avros.records(Student.class)).write(To.avroFile(args[3])); > pipeline.runAsync(); > pipeline.read(From.avroFile(input2, Student.class)).parallelDo(fn, Avros.records(Student.class)).write(To.avroFile(args[4])); > pipeline.done(); > {code} > Error: > {code} > [2015-09-30 15:18:55,835] [ERROR] [Thread-37] [org.apache.crunch.impl.spark.SparkRuntime] - Spark Exception > org.apache.spark.SparkException: Job cancelled because SparkContext was shut down > at org.apache.spark.scheduler.DAGScheduler$$anonfun$cleanUpAfterSchedulerStop$1.apply(DAGScheduler.scala:699) > at org.apache.spark.scheduler.DAGScheduler$$anonfun$cleanUpAfterSchedulerStop$1.apply(DAGScheduler.scala:698) > at scala.collection.mutable.HashSet.foreach(HashSet.scala:79) > at org.apache.spark.scheduler.DAGScheduler.cleanUpAfterSchedulerStop(DAGScheduler.scala:698) > at org.apache.spark.scheduler.DAGSchedulerEventProcessLoop.onStop(DAGScheduler.scala:1411) > at org.apache.spark.util.EventLoop.stop(EventLoop.scala:81) > at org.apache.spark.scheduler.DAGScheduler.stop(DAGScheduler.scala:1346) > at org.apache.spark.SparkContext.stop(SparkContext.scala:1386) > at org.apache.spark.api.java.JavaSparkContext.stop(JavaSparkContext.scala:652) > at org.apache.crunch.impl.spark.SparkPipeline.done(SparkPipeline.java:178) > at com.test.ParallelAction.run(ParallelAction.java:47) > at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70) > at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:84) > at com.test.ParallelAction.main(ParallelAction.java:53) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) > at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:497) > at org.apache.spark.deploy.SparkSubmit$.org$apache$spark$deploy$SparkSubmit$$runMain(SparkSubmit.scala:569) > at org.apache.spark.deploy.SparkSubmit$.doRunMain$1(SparkSubmit.scala:166) > at org.apache.spark.deploy.SparkSubmit$.submit(SparkSubmit.scala:189) > at org.apache.spark.deploy.SparkSubmit$.main(SparkSubmit.scala:110) > at org.apache.spark.deploy.SparkSubmit.main(SparkSubmit.scala) > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)