Return-Path: Delivered-To: apmail-hadoop-hbase-user-archive@locus.apache.org Received: (qmail 27238 invoked from network); 29 Feb 2008 05:57:52 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 29 Feb 2008 05:57:52 -0000 Received: (qmail 2361 invoked by uid 500); 29 Feb 2008 05:57:47 -0000 Delivered-To: apmail-hadoop-hbase-user-archive@hadoop.apache.org Received: (qmail 2282 invoked by uid 500); 29 Feb 2008 05:57:47 -0000 Mailing-List: contact hbase-user-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: hbase-user@hadoop.apache.org Delivered-To: mailing list hbase-user@hadoop.apache.org Received: (qmail 2273 invoked by uid 99); 29 Feb 2008 05:57:47 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 28 Feb 2008 21:57:47 -0800 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of annndy.lee@gmail.com designates 72.14.220.152 as permitted sender) Received: from [72.14.220.152] (HELO fg-out-1718.google.com) (72.14.220.152) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 29 Feb 2008 05:57:10 +0000 Received: by fg-out-1718.google.com with SMTP id 16so2894735fgg.35 for ; Thu, 28 Feb 2008 21:57:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; bh=4oThk6ebqX34KFTCKoWgOt9xroFTV7hmanlP+xDp2oE=; b=UKBlWawViNn9myEu6eA4mIKbd4Hwie3Xz5jznwn7kBW5DOPjXEJVFySQYP5YyIgHBbsXGQ1RmGMzGYxKZd8/UD9mssmNyb6cskSdAv5esdWIuov+TLdikzgEA5rL85ptHFmqiFvQLjPLKNNXwNSN/0V26yUC5xLkhw0roWIdL3M= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=x7YjSYozoyLbwOad+GLxSLLLkoDUTW2TbVHmpVx2I9Zjep907AN2Pj1gNxYbNBviROhQm70ewDDuL8THUd9mKqbbGaIoXBXVxxoMpucI43IprUh8UN1+P7Pcf+RdVT5MGYxX6zKnsPYRkNLdK/Ts449kVgJFHXWH82pwZkM8Ru4= Received: by 10.86.71.1 with SMTP id t1mr9768507fga.7.1204264638851; Thu, 28 Feb 2008 21:57:18 -0800 (PST) Received: by 10.86.94.17 with HTTP; Thu, 28 Feb 2008 21:57:18 -0800 (PST) Message-ID: <8e8d18110802282157g7a42906aka42a9004845658f2@mail.gmail.com> Date: Thu, 28 Feb 2008 21:57:18 -0800 From: "Andy Li" To: hbase-user@hadoop.apache.org, peeyushb@yahoo-inc.com Subject: Re: Question about exception MasterNotRunningException when running HBaseAdmin and HTable in MapReduce program In-Reply-To: <1204259255.3140.5.camel@latewhatgrow-lx.eglbp.corp.yahoo.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_10612_4062701.1204264638847" References: <8e8d18110802281858r372d8eact8cd437868f433a1e@mail.gmail.com> <1204259255.3140.5.camel@latewhatgrow-lx.eglbp.corp.yahoo.com> X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_10612_4062701.1204264638847 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Thanks for your response. Here is the following configuration I am using in hadoop-env.sh. For those not pasted, they are the default values within hadoop-env.sh along the package. ======= COPY/PASTE STARTS HERE ======== export JAVA_HOME=/usr/java/jdk1.6.0_04 export HBASE_HOME=/opt/hadoop/contrib/hbase export HADOOP_CLASSPATH=$HBASE_HOME/hbase- 0.2.0-dev.jar:$HBASE_HOME/hbase-0.2.0-dev-test.jar:$HBASE_HOME/lib/ ======= COPY/PASTE ENDS HERE ======== Do I have to explicitly specified HBASE_CONF_DIR in hadoop-env.sh? I'm still getting the same exception. Here is a snippet of my code that tries to access HBase. ======= COPY/PASTE STARTS HERE ======== HBaseConfiguration _CONF = new HBaseConfiguration(); Text t_ratio = new Text("ratio:"); Text _TABLENAME = new Text("andrew-intelligent-table"); HTableDescriptor _DESC = new HTableDescriptor("test-mapreduce-table"); _DESC.addFamily(new HColumnDescriptor(new String("ratio:"))); HBaseAdmin _ADMIN = null; HTable _TABLE = null; try { _ADMIN = new HBaseAdmin(_CONF); if ( !(_ADMIN.tableExists(_TABLENAME)) ) { System.out.println("Table don't exist, create new table"); _ADMIN.createTable(_DESC); } _TABLE = new HTable(_CONF, _TABLENAME); } catch (Exception exx) { System.out.println("Error happen when opening the tables"); exx.printStackTrace(); } ======= COPY/PASTE ENDS HERE ======== Any help or input is appreciated. Thanks. -annndy On Thu, Feb 28, 2008 at 8:27 PM, Peeyush Bishnoi wrote: > Hi Andy , > > Check for the $HADOOP_CLASSPATH , in hadoop-env.sh , which should have > entries with hbase jar file and HBASE_CONF_DIR and entries should be > exported properly. This hadoop-env.sh should be set on all the machines > in a cluster where your HRegionserver is running . > > hbase-site.xml file should have HMaster value set . > > --- > Peeyush > > > On Thu, 2008-02-28 at 18:58 -0800, Andy Li wrote: > > > Dears, > > > > Not sure if anyone encountered the same problem. > > I am running hadoop 0.17 with HBase 0.2 on Linux x86_64 with JDK 1.6. > > > > I get the following exception in my program when I tries to invoke the > > HBaseAdmin > > and HTable in the 'reduce' phase to insert data into the table. I keep > > getting the same > > exception when I try to get a HTable reference. I can run Hbase Shell, > but > > cannot make > > the MR program work. > > > > org.apache.hadoop.hbase.MasterNotRunningException > > at > org.apache.hadoop.hbase.client.HConnectionManager$TableServers.getMaster > > (HCon > > nectionManager.java:206) > > at org.apache.hadoop.hbase.client.HBaseAdmin.(HBaseAdmin.java:70) > > at hbasetest.mapreduce.URLHBaseDictReduce.reduce(URLHBaseDictReduce.java > :68) > > at org.apache.hadoop.mapred.ReduceTask.run(ReduceTask.java:333) > > at org.apache.hadoop.mapred.TaskTracker$Child.main(TaskTracker.java > :2089) > > java.lang.NullPointerException > > at hbasetest.mapreduce.URLHBaseDictReduce.reduce(URLHBaseDictReduce.java > > :148) > > at org.apache.hadoop.mapred.ReduceTask.run(ReduceTask.java:333) > > at org.apache.hadoop.mapred.TaskTracker$Child.main(TaskTracker.java > :2089) > > > > > > > > Any idea? > > > > Thanks, > > annndy > ------=_Part_10612_4062701.1204264638847--