You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by WangYQ <wa...@163.com> on 2016/04/19 15:09:42 UTC

hbaseAdmin tableExists create catalogTracker for every call

in hbase 0.98.10,  class   "HBaseAdmin "
line  303,  method  "tableExists",   will create a catalogTracker for every call


we can let a HBaseAdmin object use one CatalogTracker object, to reduce the object create, connect zk and so on




Re: hbaseAdmin tableExists create catalogTracker for every call

Posted by Ted Yu <yu...@gmail.com>.
YQ:
See HBASE-4495 where Mikhail removed this part of code from HBaseAdmin.

For 0.98, I checked the source code - it is still in the following form.

On Mon, May 2, 2016 at 7:12 PM, Enis Söztutar <en...@apache.org> wrote:

> BTW, you can use dev@hbase.apache.org rather than issues@. The latter is
> more for emails from jira.
>
> On Mon, May 2, 2016 at 7:11 PM, Enis Söztutar <en...@apache.org> wrote:
>
> > Thanks for reporting.
> >
> > In master and branch-1, this part of the code is very different and no
> > longer has the problem.
> >
> > Did you check the latest 0.98 code base? It may not be worth fixing at
> > this point.
> >
> > Enis
> >
> > On Mon, May 2, 2016 at 6:21 AM, WangYQ <wa...@163.com>
> wrote:
> >
> >> the code :
> >>
> >>  private synchronized CatalogTracker getCatalogTracker()
> >>   throws ZooKeeperConnectionException, IOException {
> >>     CatalogTracker ct = null;
> >>     try {
> >>       ct = new CatalogTracker(this.conf);
> >>       ct.start();
> >>     } catch (InterruptedException e) {
> >>       // Let it out as an IOE for now until we redo all so tolerate IEs
> >>       Thread.currentThread().interrupt();
> >>       throw new IOException("Interrupted", e);
> >>     }
> >>     return ct;
> >>   }
> >>
> >>
> >> I think we can make CatalogTracker be a object of HBaseAdmin class, can
> >> reduce many object create and destroy, reduce client to ZK
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >> At 2016-04-19 21:09:42, "WangYQ" <wa...@163.com> wrote:
> >>
> >> in hbase 0.98.10,  class   "HBaseAdmin "
> >> line  303,  method  "tableExists",   will create a catalogTracker for
> >> every call
> >>
> >>
> >> we can let a HBaseAdmin object use one CatalogTracker object, to reduce
> >> the object create, connect zk and so on
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >
> >
>

Re: hbaseAdmin tableExists create catalogTracker for every call

Posted by Enis Söztutar <en...@apache.org>.
BTW, you can use dev@hbase.apache.org rather than issues@. The latter is
more for emails from jira.

On Mon, May 2, 2016 at 7:11 PM, Enis Söztutar <en...@apache.org> wrote:

> Thanks for reporting.
>
> In master and branch-1, this part of the code is very different and no
> longer has the problem.
>
> Did you check the latest 0.98 code base? It may not be worth fixing at
> this point.
>
> Enis
>
> On Mon, May 2, 2016 at 6:21 AM, WangYQ <wa...@163.com> wrote:
>
>> the code :
>>
>>  private synchronized CatalogTracker getCatalogTracker()
>>   throws ZooKeeperConnectionException, IOException {
>>     CatalogTracker ct = null;
>>     try {
>>       ct = new CatalogTracker(this.conf);
>>       ct.start();
>>     } catch (InterruptedException e) {
>>       // Let it out as an IOE for now until we redo all so tolerate IEs
>>       Thread.currentThread().interrupt();
>>       throw new IOException("Interrupted", e);
>>     }
>>     return ct;
>>   }
>>
>>
>> I think we can make CatalogTracker be a object of HBaseAdmin class, can
>> reduce many object create and destroy, reduce client to ZK
>>
>>
>>
>>
>>
>>
>>
>> At 2016-04-19 21:09:42, "WangYQ" <wa...@163.com> wrote:
>>
>> in hbase 0.98.10,  class   "HBaseAdmin "
>> line  303,  method  "tableExists",   will create a catalogTracker for
>> every call
>>
>>
>> we can let a HBaseAdmin object use one CatalogTracker object, to reduce
>> the object create, connect zk and so on
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>
>

Re: hbaseAdmin tableExists create catalogTracker for every call

Posted by Enis Söztutar <en...@apache.org>.
Thanks for reporting.

In master and branch-1, this part of the code is very different and no
longer has the problem.

Did you check the latest 0.98 code base? It may not be worth fixing at this
point.

Enis

On Mon, May 2, 2016 at 6:21 AM, WangYQ <wa...@163.com> wrote:

> the code :
>
>  private synchronized CatalogTracker getCatalogTracker()
>   throws ZooKeeperConnectionException, IOException {
>     CatalogTracker ct = null;
>     try {
>       ct = new CatalogTracker(this.conf);
>       ct.start();
>     } catch (InterruptedException e) {
>       // Let it out as an IOE for now until we redo all so tolerate IEs
>       Thread.currentThread().interrupt();
>       throw new IOException("Interrupted", e);
>     }
>     return ct;
>   }
>
>
> I think we can make CatalogTracker be a object of HBaseAdmin class, can
> reduce many object create and destroy, reduce client to ZK
>
>
>
>
>
>
>
> At 2016-04-19 21:09:42, "WangYQ" <wa...@163.com> wrote:
>
> in hbase 0.98.10,  class   "HBaseAdmin "
> line  303,  method  "tableExists",   will create a catalogTracker for
> every call
>
>
> we can let a HBaseAdmin object use one CatalogTracker object, to reduce
> the object create, connect zk and so on
>
>
>
>
>
>
>
>
>
>

Re:hbaseAdmin tableExists create catalogTracker for every call

Posted by WangYQ <wa...@163.com>.
the code : 
 
 private synchronized CatalogTracker getCatalogTracker()
  throws ZooKeeperConnectionException, IOException {
    CatalogTracker ct = null;
    try {
      ct = new CatalogTracker(this.conf);
      ct.start();
    } catch (InterruptedException e) {
      // Let it out as an IOE for now until we redo all so tolerate IEs
      Thread.currentThread().interrupt();
      throw new IOException("Interrupted", e);
    }
    return ct;
  }


I think we can make CatalogTracker be a object of HBaseAdmin class, can reduce many object create and destroy, reduce client to ZK







At 2016-04-19 21:09:42, "WangYQ" <wa...@163.com> wrote:

in hbase 0.98.10,  class   "HBaseAdmin "
line  303,  method  "tableExists",   will create a catalogTracker for every call


we can let a HBaseAdmin object use one CatalogTracker object, to reduce the object create, connect zk and so on








 

Re: hbaseAdmin tableExists create catalogTracker for every call

Posted by Ted Yu <yu...@gmail.com>.
The CatalogTracker object may not be used by all the methods of HBaseAdmin.

Meaning, when HBaseAdmin is constructed, we don't need CatalogTracker.

On Tue, Apr 19, 2016 at 6:09 AM, WangYQ <wa...@163.com> wrote:

> in hbase 0.98.10,  class   "HBaseAdmin "
> line  303,  method  "tableExists",   will create a catalogTracker for
> every call
>
>
> we can let a HBaseAdmin object use one CatalogTracker object, to reduce
> the object create, connect zk and so on
>
>
>
>