Return-Path: X-Original-To: apmail-hbase-dev-archive@www.apache.org Delivered-To: apmail-hbase-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 0CE3F10A69 for ; Sat, 13 Jul 2013 05:22:58 +0000 (UTC) Received: (qmail 29706 invoked by uid 500); 13 Jul 2013 05:22:57 -0000 Delivered-To: apmail-hbase-dev-archive@hbase.apache.org Received: (qmail 29610 invoked by uid 500); 13 Jul 2013 05:22:56 -0000 Mailing-List: contact dev-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@hbase.apache.org Delivered-To: mailing list dev@hbase.apache.org Received: (qmail 29593 invoked by uid 99); 13 Jul 2013 05:22:55 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 13 Jul 2013 05:22:55 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of mobiusinversion@gmail.com designates 209.85.160.45 as permitted sender) Received: from [209.85.160.45] (HELO mail-pb0-f45.google.com) (209.85.160.45) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 13 Jul 2013 05:22:49 +0000 Received: by mail-pb0-f45.google.com with SMTP id mc8so9657316pbc.32 for ; Fri, 12 Jul 2013 22:22:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:mime-version:content-type:from:in-reply-to:date:cc :message-id:references:to:x-mailer; bh=PI7Pmw7oYvr/l/tgWT6D+nd/GvbS65DAry8fLqD3+h4=; b=Q7/XxDdTilTYSdr/fm4mAlPDfafzJorpK61xjEfZQ99i1SiIi6qJeYd6mvS5TbSy/H ktbAG1ti3e5u64gQTkNv7wMxMaTrFhXUQordIif6BpAkAyjnO3TxD+Qrtbu4liZ37zrc mpbG+GIrlMyT5zL+sXPbyTQsybGwR2GogFoDGAbwTkvonLiYtFUzocPitMvMbY4ps/Km 0JbNPnkWIeNDwNBpBxfn9z4as6FLKiMHlns3l6DQ9qrFAcLwFF2S0Ttbnefclu4cUHAt mh1q6jloeaB8jh8DuOAuVnWxPcMSl1eLgUr6okokSmRUrAwYpLx6WGB58to9aZItbVSE OYHQ== X-Received: by 10.66.159.105 with SMTP id xb9mr45511525pab.146.1373692947691; Fri, 12 Jul 2013 22:22:27 -0700 (PDT) Received: from [192.168.0.3] ([76.89.150.114]) by mx.google.com with ESMTPSA id bs3sm48723999pbc.42.2013.07.12.22.22.26 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 12 Jul 2013 22:22:26 -0700 (PDT) Subject: Re: Help with HBaseTestingUtility / MiniDFSCluster Mime-Version: 1.0 (Apple Message framework v1283) Content-Type: multipart/alternative; boundary="Apple-Mail=_FEEA7E16-F8C9-4A38-85A3-3CC4B2111806" From: David Williams In-Reply-To: Date: Fri, 12 Jul 2013 22:22:21 -0700 Cc: dev@hbase.apache.org Message-Id: References: <6695BD3B-5201-46A2-A332-F75E14F97CAD@gmail.com> To: Ted Yu X-Mailer: Apple Mail (2.1283) X-Virus-Checked: Checked by ClamAV on apache.org --Apple-Mail=_FEEA7E16-F8C9-4A38-85A3-3CC4B2111806 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=iso-8859-1 Hi Ted, In terms of versions, here are the jars I'm using, which come from Maven = Central. org.apache.hadoop/hadoop-core "1.2.0" org.apache.hbase/hbase "0.94.6.1" org.apache.hadoop/hadoop-test "1.2.0" org.apache.hbase/hbase "0.94.6.1" :classifier "tests" The flag ':classifier "tests"' above is a specific instruction to to the = Leiningen 2.0 to use the pomegranate library to handle Sonatype Aether = and dynamic runtime modification of the classpath, which in this case is = needed to import org.apache.hadoop.hbase HBaseTestingUtility. https://github.com/cemerick/pomegranate I just checked on address resolution, on my Mac OSX where the = TestingUtility passes: user=3D> (import 'java.net.InetSocketAddress) java.net.InetSocketAddress user=3D> (def x (InetSocketAddress. 8000)) #'user/x user=3D> (.getAddress x) # user=3D> Then I check on a CentOS vm, the unit tests still fail but the address = resolution also worked in the repl and produced the same output as = above. On Jul 12, 2013, at 9:30 PM, Ted Yu wrote: > I installed lein on Mac and Linux. >=20 > I tried 'lein test' on both platforms and the test passed on both: >=20 > lein test hbase.table-test > Starting DataNode 0 with dfs.data.dir: = /homes/hortonzy/mobius/target/test-data/246828b9-1be9-4949-9bbc-b215b378fb= 67/dfscluster_9ed0bd88-d309-4fed-9823-3bbf86973ae4/dfs/data/data1,/homes/h= ortonzy/mobius/target/test-data/246828b9-1be9-4949-9bbc-b215b378fb67/dfscl= uster_9ed0bd88-d309-4fed-9823-3bbf86973ae4/dfs/data/data2 > Cluster is active >=20 > Ran 11 tests containing 14 assertions. > 0 failures, 0 errors. >=20 > Here is Linux OS: >=20 > Linux a.net 2.6.32-220.23.1.el6.YAHOO.20120713.x86_64 #1 SMP Fri Jul = 13 11:40:51 CDT 2012 x86_64 x86_64 x86_64 GNU/Linux >=20 > Looking at MiniDFSCluster.java, line 426: >=20 > String ipAddr =3D = dn.getSelfAddr().getAddress().getHostAddress(); >=20 > It seems dn.getSelfAddr().getAddress() returned null. >=20 > According to: > = http://docs.oracle.com/javase/7/docs/api/java/net/InetSocketAddress.html#g= etAddress() >=20 > This would mean address resolution problem. >=20 > Can you check ? >=20 > Cheers >=20 > On Fri, Jul 12, 2013 at 7:37 PM, David Williams = wrote: > Hi all, >=20 > I am having an issue starting the a mini cluster for the = HBaseTestingUtility. In short I can on Mac OSX, but cannot on Linux. = But the error is cryptic and I don't know what to do next. >=20 > I submitted a ticket with full details on StackOverflow, >=20 > = http://stackoverflow.com/questions/17625938/hbase-minidfscluster-java-fail= s-in-certain-environments >=20 > But when I call .startMiniCluster on an instance of = HBaseTestingUtility , on Linux (CentOS x86_64), I receive this error: >=20 >=20 >=20 > ERROR in (create-table) (MiniDFSCluster.java:426) > Uncaught exception, not in assertion. > expected: nil > actual: java.lang.NullPointerException: null > at org.apache.hadoop.hdfs.MiniDFSCluster.startDataNodes = (MiniDFSCluster.java:426) > org.apache.hadoop.hdfs.MiniDFSCluster. = (MiniDFSCluster.java:284) > org.apache.hadoop.hbase.HBaseTestingUtility.startMiniDFSCluster = (HBaseTestingUtility.java:444) > org.apache.hadoop.hbase.HBaseTestingUtility.startMiniCluster = (HBaseTestingUtility.java:612) > org.apache.hadoop.hbase.HBaseTestingUtility.startMiniCluster = (HBaseTestingUtility.java:568) > org.apache.hadoop.hbase.HBaseTestingUtility.startMiniCluster = (HBaseTestingUtility.java:555) >=20 > I would appreciate help in finding out whats going on and how to set = up my ENV to use the HBaseTestingUtility. >=20 > Thanks > David > =20 >=20 --Apple-Mail=_FEEA7E16-F8C9-4A38-85A3-3CC4B2111806--