Return-Path: X-Original-To: apmail-tinkerpop-commits-archive@minotaur.apache.org Delivered-To: apmail-tinkerpop-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id B89B618783 for ; Sat, 13 Feb 2016 15:34:58 +0000 (UTC) Received: (qmail 71145 invoked by uid 500); 13 Feb 2016 15:34:58 -0000 Delivered-To: apmail-tinkerpop-commits-archive@tinkerpop.apache.org Received: (qmail 71089 invoked by uid 500); 13 Feb 2016 15:34:58 -0000 Mailing-List: contact commits-help@tinkerpop.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@tinkerpop.incubator.apache.org Delivered-To: mailing list commits@tinkerpop.incubator.apache.org Received: (qmail 71041 invoked by uid 99); 13 Feb 2016 15:34:58 -0000 Received: from Unknown (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 13 Feb 2016 15:34:58 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 2E19BC0BE4 for ; Sat, 13 Feb 2016 15:34:58 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -3.549 X-Spam-Level: X-Spam-Status: No, score=-3.549 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, KAM_LAZY_DOMAIN_SECURITY=1, RCVD_IN_DNSWL_HI=-5, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RP_MATCHES_RCVD=-0.329] autolearn=disabled Received: from mx2-lw-us.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id tk9nMRVPwdPP for ; Sat, 13 Feb 2016 15:34:56 +0000 (UTC) Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx2-lw-us.apache.org (ASF Mail Server at mx2-lw-us.apache.org) with SMTP id 1D33A5FE36 for ; Sat, 13 Feb 2016 15:34:55 +0000 (UTC) Received: (qmail 70818 invoked by uid 99); 13 Feb 2016 15:34:55 -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; Sat, 13 Feb 2016 15:34:55 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 3C2BEE13D2; Sat, 13 Feb 2016 15:34:55 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: okram@apache.org To: commits@tinkerpop.incubator.apache.org Date: Sat, 13 Feb 2016 15:35:04 -0000 Message-Id: <7be66f6ca6454e0ea86ddd721baed4b0@git.apache.org> In-Reply-To: <93a18476b5b645628f9ed2dcc4ce23f9@git.apache.org> References: <93a18476b5b645628f9ed2dcc4ce23f9@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [10/17] incubator-tinkerpop git commit: there is a bug in GiraphGraphComputer when chaining jobs together. damn. I have things a bit cleaner. committing what I have for now. there is a bug in GiraphGraphComputer when chaining jobs together. damn. I have things a bit cleaner. committing what I have for now. Project: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/commit/66d86cdf Tree: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/tree/66d86cdf Diff: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/diff/66d86cdf Branch: refs/heads/master Commit: 66d86cdfbb00bf1eb74f067815181f90b40d6feb Parents: 17bfdb8 Author: Marko A. Rodriguez Authored: Thu Feb 11 14:53:00 2016 -0700 Committer: Marko A. Rodriguez Committed: Thu Feb 11 14:53:00 2016 -0700 ---------------------------------------------------------------------- .../giraph/process/computer/GiraphGraphComputer.java | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/66d86cdf/giraph-gremlin/src/main/java/org/apache/tinkerpop/gremlin/giraph/process/computer/GiraphGraphComputer.java ---------------------------------------------------------------------- diff --git a/giraph-gremlin/src/main/java/org/apache/tinkerpop/gremlin/giraph/process/computer/GiraphGraphComputer.java b/giraph-gremlin/src/main/java/org/apache/tinkerpop/gremlin/giraph/process/computer/GiraphGraphComputer.java index fdded04..bc6df7a 100644 --- a/giraph-gremlin/src/main/java/org/apache/tinkerpop/gremlin/giraph/process/computer/GiraphGraphComputer.java +++ b/giraph-gremlin/src/main/java/org/apache/tinkerpop/gremlin/giraph/process/computer/GiraphGraphComputer.java @@ -123,7 +123,6 @@ public final class GiraphGraphComputer extends AbstractHadoopGraphComputer imple private Future submitWithExecutor(final Executor exec) { final long startTime = System.currentTimeMillis(); - final Configuration apacheConfiguration = ConfUtil.makeApacheConfiguration(this.giraphConfiguration); return CompletableFuture.supplyAsync(() -> { try { final FileSystem fs = FileSystem.get(this.giraphConfiguration); @@ -133,9 +132,8 @@ public final class GiraphGraphComputer extends AbstractHadoopGraphComputer imple //e.printStackTrace(); throw new IllegalStateException(e.getMessage(), e); } - this.memory.setRuntime(System.currentTimeMillis() - startTime); - return new DefaultComputerResult(InputOutputHelper.getOutputGraph(apacheConfiguration, this.resultGraph, this.persist), this.memory.asImmutable()); + return new DefaultComputerResult(InputOutputHelper.getOutputGraph(ConfUtil.makeApacheConfiguration(this.giraphConfiguration), this.resultGraph, this.persist), this.memory.asImmutable()); }, exec); } @@ -155,7 +153,7 @@ public final class GiraphGraphComputer extends AbstractHadoopGraphComputer imple // a way to verify in Giraph whether the traversal will go over the wire or not try { VertexProgram.createVertexProgram(this.hadoopGraph, ConfUtil.makeApacheConfiguration(this.giraphConfiguration)); - } catch (IllegalStateException e) { + } catch (final IllegalStateException e) { if (e.getCause() instanceof NumberFormatException) throw new NotSerializableException("The provided traversal is not serializable and thus, can not be distributed across the cluster"); } @@ -174,8 +172,6 @@ public final class GiraphGraphComputer extends AbstractHadoopGraphComputer imple this.giraphConfiguration.setNumComputeThreads(threadsPerMapper); } } - // prepare the giraph vertex-centric computing job - final GiraphJob job = new GiraphJob(this.giraphConfiguration, Constants.GREMLIN_HADOOP_GIRAPH_JOB_PREFIX + this.vertexProgram); // handle input paths (if any) String inputLocation = this.giraphConfiguration.get(Constants.GREMLIN_HADOOP_INPUT_LOCATION, null); if (null != inputLocation && FileInputFormat.class.isAssignableFrom(this.giraphConfiguration.getClass(Constants.GREMLIN_HADOOP_GRAPH_INPUT_FORMAT, InputFormat.class))) { @@ -185,6 +181,8 @@ public final class GiraphGraphComputer extends AbstractHadoopGraphComputer imple } // handle output paths final Path outputPath = new Path(Constants.getGraphLocation(this.giraphConfiguration.get(Constants.GREMLIN_HADOOP_OUTPUT_LOCATION))); + // prepare the giraph vertex-centric computing job + final GiraphJob job = new GiraphJob(this.giraphConfiguration, Constants.GREMLIN_HADOOP_GIRAPH_JOB_PREFIX + this.vertexProgram); FileOutputFormat.setOutputPath(job.getInternalJob(), outputPath); job.getInternalJob().setJarByClass(GiraphGraphComputer.class); this.logger.info(Constants.GREMLIN_HADOOP_GIRAPH_JOB_PREFIX + this.vertexProgram);