Return-Path: X-Original-To: apmail-crunch-commits-archive@www.apache.org Delivered-To: apmail-crunch-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 4E22418CF0 for ; Thu, 7 May 2015 01:16:14 +0000 (UTC) Received: (qmail 39521 invoked by uid 500); 7 May 2015 01:16:14 -0000 Delivered-To: apmail-crunch-commits-archive@crunch.apache.org Received: (qmail 39485 invoked by uid 500); 7 May 2015 01:16:14 -0000 Mailing-List: contact commits-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 commits@crunch.apache.org Received: (qmail 39475 invoked by uid 99); 7 May 2015 01:16:14 -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; Thu, 07 May 2015 01:16:14 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id C0399E056A; Thu, 7 May 2015 01:16:13 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: mkwhit@apache.org To: commits@crunch.apache.org Message-Id: X-Mailer: ASF-Git Admin Mailer Subject: crunch git commit: CRUNCH-507: Added additional constructor and made constructor avoid NPE Date: Thu, 7 May 2015 01:16:13 +0000 (UTC) Repository: crunch Updated Branches: refs/heads/master cc62ef73e -> 87318ca7e CRUNCH-507: Added additional constructor and made constructor avoid NPE Project: http://git-wip-us.apache.org/repos/asf/crunch/repo Commit: http://git-wip-us.apache.org/repos/asf/crunch/commit/87318ca7 Tree: http://git-wip-us.apache.org/repos/asf/crunch/tree/87318ca7 Diff: http://git-wip-us.apache.org/repos/asf/crunch/diff/87318ca7 Branch: refs/heads/master Commit: 87318ca7eec9f35ad9c2e386531344b5e1f8a45b Parents: cc62ef7 Author: Micah Whitacre Authored: Mon Apr 6 21:36:22 2015 -0500 Committer: Micah Whitacre Committed: Wed May 6 19:28:04 2015 -0500 ---------------------------------------------------------------------- .../main/java/org/apache/crunch/impl/spark/SparkPipeline.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/crunch/blob/87318ca7/crunch-spark/src/main/java/org/apache/crunch/impl/spark/SparkPipeline.java ---------------------------------------------------------------------- diff --git a/crunch-spark/src/main/java/org/apache/crunch/impl/spark/SparkPipeline.java b/crunch-spark/src/main/java/org/apache/crunch/impl/spark/SparkPipeline.java index 8108de8..da4f0b4 100644 --- a/crunch-spark/src/main/java/org/apache/crunch/impl/spark/SparkPipeline.java +++ b/crunch-spark/src/main/java/org/apache/crunch/impl/spark/SparkPipeline.java @@ -70,9 +70,14 @@ public class SparkPipeline extends DistributedPipeline { } public SparkPipeline(JavaSparkContext sparkContext, String appName) { - super(appName, sparkContext.hadoopConfiguration(), new SparkCollectFactory()); + this(sparkContext, appName, null, sparkContext != null? sparkContext.hadoopConfiguration(): new Configuration()); + } + + public SparkPipeline(JavaSparkContext sparkContext, String appName, Class jarClass, Configuration conf) { + super(appName, conf, new SparkCollectFactory()); this.sparkContext = Preconditions.checkNotNull(sparkContext); this.sparkConnect = sparkContext.getSparkHome().orNull(); + this.jarClass = jarClass; } @Override