You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "ramkrishna.s.vasudevan (JIRA)" <ji...@apache.org> on 2011/07/25 16:29:10 UTC

[jira] [Commented] (HBASE-4138) If zookeeper.znode.parent is not specifed explicitly in Client code then HTable object loops continuously waiting for the root region by using /hbase as the base node.

    [ https://issues.apache.org/jira/browse/HBASE-4138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13070520#comment-13070520 ] 

ramkrishna.s.vasudevan commented on HBASE-4138:
-----------------------------------------------

1. I tried to identify the problem in HBASE-4138.  I ended up in the following analysis,

The HMaster creates the BASENODE along with unassigned node, RS node and table node based on 
the zookeeper.znode.parent property.

Currently when we use the HTable() as part of getConnection() if the this value is  not configured
we tend to create a new connection.

Two points to not here is - 
1)The HTable documentation clearly states us to use the same configuration object.


But what if its not done, particularly someone forgets to set this base node property.  Even it may be
like in my RS instance i have configured the property but not in the master instance.

2)The reuse of the getConnection() logic across all levels, was it intended ?

The major problem lies in the the HConnectionManager.setupZookeeperTrackers() which tries to
create the BASENODES again.

What i feel here is,
this should not be done as only the master should have the rights to create it else there are
high possibility that muliple basenodes can be created.

Currently as the Client creates the node once again with the default value '/hbase'
the client keeps waiting to know the root location indefinitely.

What happens in the Admin case:
The same thing happens in admin case but in HBaseAdmin() we call the connection.getMaster api
which throws an exception.  
'ZooKeeper available but no active master location found'

So we should prevent the Admin or HTable (In general any client even RS ) from creating the 
base nodes and what ever is created by the master should be used by the clients.

> If zookeeper.znode.parent is not specifed explicitly in Client code then HTable object loops continuously waiting for the root region by using /hbase as the base node.
> -----------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: HBASE-4138
>                 URL: https://issues.apache.org/jira/browse/HBASE-4138
>             Project: HBase
>          Issue Type: Bug
>          Components: client
>    Affects Versions: 0.90.3
>            Reporter: ramkrishna.s.vasudevan
>            Assignee: ramkrishna.s.vasudevan
>             Fix For: 0.90.4
>
>
> Change the zookeeper.znode.parent property (default is /hbase).
> Now do not specify this change in the client code.
> Use the HTable Object.
> The HTable is not able to find the root region and keeps continuously looping.
> Find the stack trace:
> ====================
> Object.wait(long) line: not available [native method]		 
> RootRegionTracker(ZooKeeperNodeTracker).blockUntilAvailable(long) line: 122
> RootRegionTracker.waitRootRegionLocation(long) line: 73		 
> HConnectionManager$HConnectionImplementation.locateRegion(byte[],
> byte[], boolean) line: 578
> HConnectionManager$HConnectionImplementation.locateRegion(byte[],
> byte[]) line: 558
> HConnectionManager$HConnectionImplementation.locateRegionInMeta(byte[],
> byte[], byte[], boolean, Object) line: 687
> HConnectionManager$HConnectionImplementation.locateRegion(byte[],
> byte[], boolean) line: 589
> HConnectionManager$HConnectionImplementation.locateRegion(byte[],
> byte[]) line: 558
> HConnectionManager$HConnectionImplementation.locateRegionInMeta(byte[],
> byte[], byte[], boolean, Object) line: 687
> HConnectionManager$HConnectionImplementation.locateRegion(byte[],
> byte[], boolean) line: 593
> HConnectionManager$HConnectionImplementation.locateRegion(byte[],
> byte[]) line: 558
> HTable.<init>(Configuration, byte[]) line: 171		 
> HTable.<init>(Configuration, String) line: 145		 
> HBaseTest.test() line: 45

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira