Return-Path: X-Original-To: apmail-incubator-giraph-user-archive@minotaur.apache.org Delivered-To: apmail-incubator-giraph-user-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 50F289540 for ; Fri, 13 Apr 2012 11:42:38 +0000 (UTC) Received: (qmail 13698 invoked by uid 500); 13 Apr 2012 11:42:38 -0000 Delivered-To: apmail-incubator-giraph-user-archive@incubator.apache.org Received: (qmail 13671 invoked by uid 500); 13 Apr 2012 11:42:38 -0000 Mailing-List: contact giraph-user-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: giraph-user@incubator.apache.org Delivered-To: mailing list giraph-user@incubator.apache.org Received: (qmail 13663 invoked by uid 99); 13 Apr 2012 11:42:38 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 13 Apr 2012 11:42:38 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of castagna.lists@googlemail.com designates 74.125.82.175 as permitted sender) Received: from [74.125.82.175] (HELO mail-we0-f175.google.com) (74.125.82.175) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 13 Apr 2012 11:42:30 +0000 Received: by wera1 with SMTP id a1so1889670wer.6 for ; Fri, 13 Apr 2012 04:42:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:x-enigmail-version:content-type :content-transfer-encoding; bh=R0N6tXq9CePvn0DjOEXIX1VrE1DNCmvIe/pn+wYchL0=; b=RC/PlGcSILV70fNmZ0CWeDBCJBYhMfBywBZ7vVR/an3Kw9Tu7DV3zDP8jvWr2xt1dq ASEfhUZusb2K4Kn4Qgzm+8LeElTD7v7sAoGLLIhGJCCcehDwIMM/jY856y10bzSOng9f 35CjM3qWo9UDy9imKq8yDhpXZNluvlHY1+AQgrJXbiXBmZoYb805MFzTP3RS/g8O2xu+ IHXJbMT+/scri13OEKjcWUU7e71Q7OPBdI0KeWqbRIgefoKkCzyAGKvyS++Yr+1akm0l sHrDDNPIl5GY6fdpUcSQqhtUdOARuANeh9vsXTGSiThgRvKPBVasFGNoqSDGFesCPYXW 0cJw== Received: by 10.180.91.168 with SMTP id cf8mr3178302wib.0.1334317330262; Fri, 13 Apr 2012 04:42:10 -0700 (PDT) Received: from [192.168.2.4] (80-42-195-68.dynamic.dsl.as9105.com. [80.42.195.68]) by mx.google.com with ESMTPS id k6sm4195583wiy.7.2012.04.13.04.42.09 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 13 Apr 2012 04:42:09 -0700 (PDT) Message-ID: <4F881110.9040508@googlemail.com> Date: Fri, 13 Apr 2012 12:42:08 +0100 From: Paolo Castagna User-Agent: Thunderbird 2.0.0.24 (X11/20101027) MIME-Version: 1.0 To: giraph-user@incubator.apache.org Subject: Re: A simple use case: shortest paths on a FOAF (i.e. Friend of a Friend) graph References: <4F84872E.4050101@googlemail.com> <4F84B1BC.6080807@apache.org> <4F852330.7050002@googlemail.com> <4F85277C.403@googlemail.com> <4F85C07E.5030201@apache.org> <4F87EFEA.1080705@googlemail.com> In-Reply-To: <4F87EFEA.1080705@googlemail.com> X-Enigmail-Version: 0.96.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Paolo Castagna wrote: > Avery Ching wrote: >> It shouldn't be, your code looks very similar to the unittests (i.e. >> TestManualCheckpoint.java). So, you're trying to run your test with the >> local hadoop (similar to the unittests)? Or are you using an actual >> hadoop setup? > > Hi Avery, > here is a few more details on what I am trying to do, in order to run my Giraph > jobs on a local Hadoop running (for testing and debugging stuff locally): > > GiraphJob job = new GiraphJob("shortest paths"); > Configuration conf = job.getConfiguration(); > conf.setBoolean(GiraphJob.SPLIT_MASTER_WORKER, false); > conf.setBoolean(GiraphJob.LOCAL_TEST_MODE, true); > // conf.set(GiraphJob.ZOOKEEPER_JAR, > "file://target/dependency/zookeeper-3.3.3.jar"); > job.setWorkerConfiguration(1, 1, 100.0f); > job.setVertexClass(SimpleShortestPathsVertex.class); > job.setVertexInputFormatClass(SimpleShortestPathsVertexInputFormat.class); > job.setVertexOutputFormatClass(SimpleShortestPathsVertexOutputFormat.class); > FileInputFormat.addInputPath(job.getInternalJob(), new > Path("src/main/resources/giraph1.txt")); > Path outputPath = new Path("target/giraph1"); > FileSystem hdfs = FileSystem.get(conf); > hdfs.delete(outputPath, true); > FileOutputFormat.setOutputPath(job.getInternalJob(), outputPath); > job.run(true); > > Am I doing something wrong/stupid here? > Am I missing something important? (probably! but I do not see what I am missing) This is a better way: Iterable results = InternalVertexRunner.run( SimpleShortestPathsVertex.class, SimpleShortestPathsVertex.SimpleShortestPathsVertexInputFormat.class, SimpleShortestPathsVertex.SimpleShortestPathsVertexOutputFormat.class, params, graph); ... which starts a local ZooKeeper properly. However, I still have a question: when I run it in a unit test everything is fine. When I run it on a Java main method, it hangs towards the end. Paolo