hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Doug Meil <doug.m...@explorysmedical.com>
Subject Re: Looking for a single row - HTable.get(Get) or Scan(Get)
Date Wed, 09 May 2012 21:29:01 GMT

Also, there is multi-Get support as of 0.90.x to further optimize the RPC
calls if you need to make a bunch of calls.

On 5/9/12 4:47 PM, "Jean-Daniel Cryans" <jdcryans@apache.org> wrote:

>What Bryan said, also Scan(Get) is used internally in the region
>server code so that's probably why that constructor exists.
>But as a user you need to create the scanner, do next() then close it
>so using a straight Get saves 2 rpc.
>On Wed, May 9, 2012 at 1:43 PM, Bryan Beaudreault
><bbeaudreault@hubspot.com> wrote:
>> Gets just boil down to single-row Scans.  I believe the only reason to
>> Scan s = new Scan(Get) would be if you need to add extra options onto
>> get.  Get's API is more simplified than Scan's.
>> On Wed, May 9, 2012 at 4:19 PM, Kevin <kevin.macksamie@gmail.com> wrote:
>>> Hi,
>>> From what I can tell, there are two ways of scanning a table in HBase.
>>> hoping to learn a bit by asking is the most efficient way to grab a
>>> row from an HTable?
>>> One can ask the HTable directly by creating a Get object, or one can
>>> a Scan object with a Get object and pass it along to the HTable.
>>> Maybe it doesn't matter. By looking at the source code I couldn't see
>>> any one way might be faster/better than another.
>>> Thanks.

View raw message