Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
HBase >> mail # user >> HBaseAdmin needs a close methord


Copy link to this message
-
Re: HBaseAdmin needs a close methord
Nope, AFAIK its not in CDH3u3, but CDH3u4 will have it.

On Thu, Apr 19, 2012 at 10:57 AM, Ramkrishna.S.Vasudevan
<[EMAIL PROTECTED]> wrote:
> Hi Lee
>
> Is HBASE-5073 resolved in that release?
>
> Regards
> Ram
>
>> -----Original Message-----
>> From: Eason Lee [mailto:[EMAIL PROTECTED]]
>> Sent: Thursday, April 19, 2012 10:40 AM
>> To: [EMAIL PROTECTED]
>> Subject: Re: HBaseAdmin needs a close methord
>>
>> I am using cloudera's cdh3u3
>> > Hi Lee
>> >
>> > Which version of HBase are you using?
>> >
>> > Regards
>> > Ram
>> >
>> >> -----Original Message-----
>> >> From: Eason Lee [mailto:[EMAIL PROTECTED]]
>> >> Sent: Thursday, April 19, 2012 9:36 AM
>> >> To: [EMAIL PROTECTED]
>> >> Subject: HBaseAdmin needs a close methord
>> >>
>> >> Resently, my app meets a problem list as follows
>> >>
>> >> Can't construct instance of class
>> >> org/apache/hadoop/hbase/client/HBaseAdmin
>> >> Exception in thread "Thread-2" java.lang.OutOfMemoryError: unable to
>> >> create new native thread
>> >> at java.lang.Thread.start0(Native Method)
>> >> at java.lang.Thread.start(Thread.java:640)
>> >> at org.apache.zookeeper.ClientCnxn.start(ClientCnxn.java:414)
>> >> at org.apache.zookeeper.ZooKeeper.<init>(ZooKeeper.java:378)
>> >> at org.apache.hadoop.hbase.zookeeper.ZKUtil.connect(ZKUtil.java:97)
>> >> at
>> >>
>> org.apache.hadoop.hbase.zookeeper.ZooKeeperWatcher.<init>(ZooKeeperWatc
>> >> her.java:119)
>> >> at
>> >>
>> org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementa
>> >> tion.getZooKeeperWatcher(HConnectionManager.java:1002)
>> >> at
>> >>
>> org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementa
>> >> tion.setupZookeeperTrackers(HConnectionManager.java:304)
>> >> at
>> >>
>> org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementa
>> >> tion.<init>(HConnectionManager.java:295)
>> >> at
>> >>
>> org.apache.hadoop.hbase.client.HConnectionManager.getConnection(HConnec
>> >> tionManager.java:157)
>> >> at
>> org.apache.hadoop.hbase.client.HBaseAdmin.<init>(HBaseAdmin.java:90)
>> >> Call to org.apache.hadoop.hbase.HBaseAdmin::HBaseAdmin failed!
>> >>
>> >> My app create HBaseAdmin every 30s,and the threads used by my app
>> >> increases about 1thread/30s.See from the stack, there is only one
>> >> HBaseAdmin in Memory, but lots of Configuration and
>> >> HConnectionImplementation instances.
>> >>
>> >> I can see from the sources, everytime when HBaseAdmin is created, a
>> new
>> >> Configuration and HConnectionImplementation is created and added to
>> >> HConnectionManager.HBASE_INSTANCES.So they are not collected by gc
>> when
>> >> HBaseAdmin is collected.
>> >>
>> >> So i think we need to add a close methord to remove the
>> >> Configuration&HConnectionImplementation from
>> >> HConnectionManager.HBASE_INSTANCES.Just as follows:
>> >>
>> >> public void close(){
>> >>    HConnectionManager.deleteConnection(getConfiguration(), true);
>> >> }
>> >
>> >
>> >
>
>

--
Harsh J