yes, I just want to setup a test environment
On Sun, Jan 5, 2014 at 6:48 PM, Ted Yu <[email protected]> wrote: > For hbase.rootdir, hdfs was not used. > > Is that intended ? > > Thanks > > On Jan 4, 2014, at 10:46 PM, Li Li <[email protected]> wrote: > >> hi all, >> I am new to hbase and encounter a problem of client connection. I >> download latest stable version(0.94.15) and start the server >> successfully. And I can use ./bin/hbase shell to connect to server in >> local, But I can't connect to the server using a remote java client. >> My setup configures: >> 1. OS >> Centos 5.5 >> 2. HBase >> 0.94.15 standalone mode >> 3. hbase-site.xml >> <configuration> >> <property> >> <name>hbase.rootdir</name> >> <value>file:///home/lili/hbasedata</value> >> </property> >> <property> >> <name>hbase.zookeeper.property.dataDir</name> >> <value>/home/lili/zookeeperdata</value> >> </property> >> <property> >> <name>hbase.master.port</name> >> <value>61000</value> >> </property> >> <property> >> <name>hbase.master.info.port</name> >> <value>61010</value> >> </property> >> <property> >> <name>hbase.regionserver.port</name> >> <value>61020</value> >> </property> >> <property> >> <name>hbase.regionserver.info.port</name> >> <value>61030</value> >> </property> >> <property> >> <name>hbase.zookeeper.leaderport</name> >> <value>63888</value> >> </property> >> <property> >> <name>hbase.zookeeper.property.clientPort</name> >> <value>62181</value> >> </property> >> <property> >> <name>hbase.rest.port</name> >> <value>58080</value> >> </property> >> </configuration> >> >> 4. remote http test to master >> http://server-ip:61010/master-status correct >> >> 5. region server http >> http://server-ip::61030 correct >> >> 6. remote client test(windows) >> telnet server-ip 62181 correct >> >> 7. java program >> >> Configuration myConf = HBaseConfiguration.create(); >> myConf.set("hbase.zookeeper.quorum", "172.19.34.35"); >> myConf.set("hbase.zookeeper.property.clientPort", "62181"); >> HTableInterface usersTable = new HTable(myConf, "users"); >> { >> Put p = new Put(Bytes.toBytes("TheRealMT")); >> p.add(Bytes.toBytes("info"), Bytes.toBytes("name"), >> Bytes.toBytes("Mark Twain")); >> p.add(Bytes.toBytes("info"), Bytes.toBytes("email"), >> Bytes.toBytes("[email protected]")); >> p.add(Bytes.toBytes("info"), Bytes.toBytes("password"), >> Bytes.toBytes("Langhorne")); >> usersTable.put(p); >> } >> { >> Put p = new Put(Bytes.toBytes("TheRealMT")); >> p.add(Bytes.toBytes("info"), >> Bytes.toBytes("password"), >> Bytes.toBytes("abc123")); >> usersTable.put(p); >> } >> usersTable.close(); >> >> When runing this program, it hangs at this line: HTableInterface >> usersTable = new HTable(myConf, "users"); >> I have checked in hbase shell by scan 'users', it's an empty table >> >> >> After very long time, it throws an exception: >> >> 14-01-05 14:23:34,091 INFO main Environment Client >> environment:zookeeper.version >> =3.4.5-1392090, built on 09/30/2012 17:52 GMT >> 14-01-05 14:23:34,122 INFO main Environment Client >> environment:host.name=wangzho >> ngxin.HOLD.FOUNDER.COM >> 14-01-05 14:23:34,122 INFO main Environment Client >> environment:java.version=1.7. >> 0_45 >> 14-01-05 14:23:34,137 INFO main Environment Client >> environment:java.vendor=Oracl >> e Corporation >> 14-01-05 14:23:34,137 INFO main Environment Client >> environment:java.home=C:\Prog >> ram Files\Java\jdk1.7.0_45\jre >> >> 14-01-05 14:23:34,137 INFO main Environment Client >> environment:java.io.tmpdir=C: >> \DOCUME~1\lili.dz\LOCALS~1\Temp\ >> 14-01-05 14:23:34,137 INFO main Environment Client >> environment:java.compiler=<NA >> 14-01-05 14:23:34,137 INFO main Environment Client >> environment:os.name=Windows X >> P >> 14-01-05 14:23:34,137 INFO main Environment Client environment:os.arch=x86 >> 14-01-05 14:23:34,137 INFO main Environment Client environment:os.version=5.1 >> 14-01-05 14:23:34,137 INFO main Environment Client >> environment:user.name=lili.dz >> 14-01-05 14:23:34,137 INFO main Environment Client >> environment:user.home=C:\Docu >> ments and Settings\lili.dz >> 14-01-05 14:23:34,137 INFO main Environment Client >> environment:user.dir=C:\Docum >> ents and Settings\lili.dz\workspace\HBaseTest >> 14-01-05 14:23:34,137 INFO main ZooKeeper Initiating client connection, >> connectS >> tring=172.19.34.35:62181 sessionTimeout=180000 watcher=hconnection >> 14-01-05 14:23:34,418 INFO main RecoverableZooKeeper The identifier of this >> proc >> ess is [email protected] >> 14-01-05 14:23:43,391 INFO main-SendThread(172.19.34.35:62181) >> ClientCnxn$SendTh >> read Opening socket connection to server 172.19.34.35/172.19.34.35:62181. >> Will n >> ot attempt to authenticate using SASL (unknown error) >> 14-01-05 14:23:43,407 INFO main-SendThread(172.19.34.35:62181) >> ClientCnxn$SendTh >> read Socket connection established to 172.19.34.35/172.19.34.35:62181, >> initiatin >> g session >> 14-01-05 14:23:43,407 INFO main-SendThread(172.19.34.35:62181) >> ClientCnxn$SendTh >> read Session establishment complete on server >> 172.19.34.35/172.19.34.35:62181, s >> essionid = 0x1435626fec5000e, negotiated timeout = 40000 >> Exception in thread "main" >> org.apache.hadoop.hbase.client.NoServerForRegionExcep >> tion: Unable to find region for users,,99999999999999 after 14 tries. >> at >> org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation. >> locateRegionInMeta(HConnectionManager.java:1092) >> at >> org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation. >> locateRegion(HConnectionManager.java:997) >> at >> org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation. >> locateRegionInMeta(HConnectionManager.java:1099) >> at >> org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation. >> locateRegion(HConnectionManager.java:1001) >> at >> org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation. >> locateRegion(HConnectionManager.java:958) >> at org.apache.hadoop.hbase.client.HTable.finishSetup(HTable.java:251) >> at org.apache.hadoop.hbase.client.HTable.<init>(HTable.java:155) >> at org.apache.hadoop.hbase.client.HTable.<init>(HTable.java:129) >> at test.Test.main(Test.java:18)
