FAQ
Hi,

I have a query regarding what is the best practice regarding opening a
HTable when using the client API. I am using a web application to read
and write to HBase. I have several HTables I will be regularly reading
and writing to (not only from my web application but also from other
apps in parallel). Now the ambiguity I have is - do I open a HTable
(i.e. initialize) once in the applications life-cycle or should be it
be opened and closed per-request?

--
Imran M Yousuf
Blog: http://imyousuf-tech.blogs.smartitengineering.com/
Mobile: +880-1711402557

Search Discussions

  • Jeff Zhang at Aug 22, 2010 at 6:19 am
    You can use the HTablePool, can you first get HTable from HTablePool
    and put it back to HTablePool when you finish the operation and next
    time you can reuse the HTable.


    On Sat, Aug 21, 2010 at 11:04 PM, Imran M Yousuf wrote:
    Hi,

    I have a query regarding what is the best practice regarding opening a
    HTable when using the client API. I am using a web application to read
    and write to HBase. I have several HTables I will be regularly reading
    and writing to (not only from my web application but also from other
    apps in parallel). Now the ambiguity I have is - do I open a HTable
    (i.e. initialize) once in the applications life-cycle or should be it
    be opened and closed per-request?

    --
    Imran M Yousuf
    Blog: http://imyousuf-tech.blogs.smartitengineering.com/
    Mobile: +880-1711402557


    --
    Best Regards

    Jeff Zhang
  • Imran M Yousuf at Aug 22, 2010 at 6:58 am

    On Sun, Aug 22, 2010 at 12:18 PM, Jeff Zhang wrote:
    You can use the HTablePool, can you first get HTable from HTablePool
    and put it back to HTablePool when you finish the operation and next
    time you can reuse the HTable.
    Thanks Jeff, looks like a nice option! Will use it.

    Best regards,

    Imran
    On Sat, Aug 21, 2010 at 11:04 PM, Imran M Yousuf wrote:
    Hi,

    I have a query regarding what is the best practice regarding opening a
    HTable when using the client API. I am using a web application to read
    and write to HBase. I have several HTables I will be regularly reading
    and writing to (not only from my web application but also from other
    apps in parallel). Now the ambiguity I have is - do I open a HTable
    (i.e. initialize) once in the applications life-cycle or should be it
    be opened and closed per-request?

    --
    Imran M Yousuf
    Blog: http://imyousuf-tech.blogs.smartitengineering.com/
    Mobile: +880-1711402557


    --
    Best Regards

    Jeff Zhang


    --
    Imran M Yousuf
    Entrepreneur & CEO
    Smart IT Engineering Ltd.
    Dhaka, Bangladesh
    Email: imran@smartitengineering.com
    Blog: http://imyousuf-tech.blogs.smartitengineering.com/
    Mobile: +880-1711402557
  • Alex Baranau at Sep 1, 2010 at 12:27 pm
    My message is might be a bit late, but for others seeking the answer to this
    quite frequently asked question I'd add the following link:
    http://search-hadoop.com/m/o0hih24P4L71

    Alex Baranau
    ----
    Sematext :: http://sematext.com/ :: Solr - Lucene - Nutch

    On Sun, Aug 22, 2010 at 9:57 AM, Imran M Yousuf wrote:
    On Sun, Aug 22, 2010 at 12:18 PM, Jeff Zhang wrote:
    You can use the HTablePool, can you first get HTable from HTablePool
    and put it back to HTablePool when you finish the operation and next
    time you can reuse the HTable.
    Thanks Jeff, looks like a nice option! Will use it.

    Best regards,

    Imran
    On Sat, Aug 21, 2010 at 11:04 PM, Imran M Yousuf wrote:
    Hi,

    I have a query regarding what is the best practice regarding opening a
    HTable when using the client API. I am using a web application to read
    and write to HBase. I have several HTables I will be regularly reading
    and writing to (not only from my web application but also from other
    apps in parallel). Now the ambiguity I have is - do I open a HTable
    (i.e. initialize) once in the applications life-cycle or should be it
    be opened and closed per-request?

    --
    Imran M Yousuf
    Blog: http://imyousuf-tech.blogs.smartitengineering.com/
    Mobile: +880-1711402557


    --
    Best Regards

    Jeff Zhang


    --
    Imran M Yousuf
    Entrepreneur & CEO
    Smart IT Engineering Ltd.
    Dhaka, Bangladesh
    Email: imran@smartitengineering.com
    Blog: http://imyousuf-tech.blogs.smartitengineering.com/
    Mobile: +880-1711402557

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupuser @
categorieshbase, hadoop
postedAug 22, '10 at 6:05a
activeSep 1, '10 at 12:27p
posts4
users3
websitehbase.apache.org

People

Translate

site design / logo © 2022 Grokbase