You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hbase.apache.org by David Pérez <cr...@yahoo.es> on 2011/03/03 11:31:48 UTC

The HTable constructor hangs!!!!

Hi,

I'm quite newbie into the HBase world, and I'm having basic problems.

I have installed a standalone version of HBase 0.20.6 into a Linux machine.
The web interface works ok.

Now with a basic Java client from another machine, I can successfully create 
a table and some families.

I can also successfully add data with the Ruby shell.

The problem I'm having is that if I try this:

HBaseConfiguration hConfig = new HBaseConfiguration();
hConfig.set(HConstants.ZOOKEEPER_QUORUM, "myserver");
HTable tbl = new HTable(hConfig, "mytable");

my program hangs forever in the last step.
It happens always, even if I restart the HBase server.

I have looked in the server logs and the only relevant error I see is:

WARN org.apache.hadoop.hbase.zookeeper.ZooKeeperWrapper: 
Failed to create out of safe mode in ZooKeeper: 
org.apache.zookeeper.KeeperException$NodeExistsException: KeeperErrorCode = 
NodeExists for /hbase/safe-mode

WARN org.apache.zookeeper.server.PrepRequestProcessor: 
Got exception when processing sessionid:0x12e7b26d3d50000 type:create 
cxid:0xd zxid:0xfffffffffffffffe txntype:unknown n/a
org.apache.zookeeper.KeeperException$NodeExistsException: 
KeeperErrorCode = NodeExists
        at org.apache.zookeeper.server.PrepRequestProcessor.pRequest
        (PrepRequestProcessor.java:245)
        at org.apache.zookeeper.server.PrepRequestProcessor.run
        (PrepRequestProcessor.java:114)

Here is the call stack of my hung Java client:
Thread [main] (Suspended)	
	Object.wait(long) line: not available [native method]	
	ClientCnxn$Packet(Object).wait() line: 485	
	ClientCnxn.submitRequest() line: 1099	
	ZooKeeper.exists(String, Watcher) line: 775	
	ZooKeeper.exists(String, boolean) line: 808	
	ZooKeeperWrapper.ensureExists(String) line: 405	
	ZooKeeperWrapper.ensureParentExists(String) line: 432	
	ZooKeeperWrapper.checkOutOfSafeMode() line: 545	
	HConnectionManager$TableServers.locateRootRegion() line: 964	
	HConnectionManager$TableServers.locateRegion(byte[], byte[], boolean)
		line: 625	
	HConnectionManager$TableServers.locateRegion(byte[], byte[]) line: 601	
	HConnectionManager$TableServers.locateRegionInMeta(byte[], byte[], 
		byte[], boolean, Object) line: 670	
	HConnectionManager$TableServers.locateRegion(byte[], byte[], boolean) 
		line: 630	
	HConnectionManager$TableServers.locateRegion(byte[], byte[]) line: 601	
	HConnectionManager$TableServers.locateRegionInMeta(byte[], byte[], 
		byte[], boolean, Object) line: 670	
	HConnectionManager$TableServers.locateRegion(byte[], byte[], 
		boolean) line: 634	
	HConnectionManager$TableServers.locateRegion(byte[], byte[]) line: 601	
	HTable.<init>(HBaseConfiguration, byte[]) line: 134	


I've googled a little but no clear answer.

I hope this problem will be very easy to solve.
Thanks in advance for any help.


David


Re: The HTable constructor hangs!!!!

Posted by Stack <st...@duboce.net>.
On Thu, Mar 3, 2011 at 2:31 AM, David Pérez <cr...@yahoo.es> wrote:
> I have installed a standalone version of HBase 0.20.6 into a Linux machine.
> The web interface works ok.
>

Please use our current stable offering, 0.90.1.

> Now with a basic Java client from another machine, I can successfully create
> a table and some families.
>

What is the difference between this java client and the one you
describe below?  The one below is local to the machine?


> I can also successfully add data with the Ruby shell.
>
> The problem I'm having is that if I try this:
>
> HBaseConfiguration hConfig = new HBaseConfiguration();
> hConfig.set(HConstants.ZOOKEEPER_QUORUM, "myserver");
> HTable tbl = new HTable(hConfig, "mytable");
>


Looks like its stuck trying read root location.  Master logs say it
deployed fine?  The UI is showing it deployed when you try to do the
above?

Do more stack traces.  For sure its hung up checking node existence?

St.Ack