HTable.getRow() for only a column family?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

HTable.getRow() for only a column family?

Ryan Lynch-2
I have a use case in which we want to access all the columns for a
supplied column family while also avoiding the overhead of reading any
other column families.  There seems to be no method for doing this but
doing a quick dive into the code it "seems" like this should be
relatively easy to allow. This seems desirable since the architecture
describes column families being stored together so reading only a single
column family should be a lighter operation.  Is this worthy of a JIRA
issue and patch?

 

Regards,

Ryan Lynch

Reply | Threaded
Open this post in threaded view
|

Re: HTable.getRow() for only a column family?

Bryan Duxbury-2
I was thinking this is something people would want to do. Currently,  
there's getMulti, which takes an array of columns you want to  
retrieve. The only thing it doesn't do is have support for globbing  
of some sort - ie, "give me all the columns for column family x"  
without having to first know all the column qualifiers. I guess you  
could do something like leave off the ":", which means the entire thing.

Would that satisfy your needs? If so, we should create a new JIRA for  
the feature of adding family globbing to getMulti.

-Bryan

On May 20, 2008, at 10:55 AM, Ryan Lynch wrote:

> I have a use case in which we want to access all the columns for a
> supplied column family while also avoiding the overhead of reading any
> other column families.  There seems to be no method for doing this but
> doing a quick dive into the code it "seems" like this should be
> relatively easy to allow. This seems desirable since the architecture
> describes column families being stored together so reading only a  
> single
> column family should be a lighter operation.  Is this worthy of a JIRA
> issue and patch?
>
>
>
> Regards,
>
> Ryan Lynch
>

Reply | Threaded
Open this post in threaded view
|

RE: HTable.getRow() for only a column family?

Ryan Lynch-2
Yes that would be very helpful. Looking at the code for
HTable.getRow(...) it ultimately calls HRegion.getFull(Text, long) which
actually iterates over each column family to retrieve the results for
getRow().  If it really is as simple as that I would be more than happy
to submit a JIRA with a patch.  

I don't see the getMulti call.  Is that part of 0.2?

Regards,
Ryan

-----Original Message-----
From: Bryan Duxbury [mailto:[hidden email]]
Sent: Tuesday, May 20, 2008 11:00 AM
To: [hidden email]
Subject: Re: HTable.getRow() for only a column family?

I was thinking this is something people would want to do. Currently,  
there's getMulti, which takes an array of columns you want to  
retrieve. The only thing it doesn't do is have support for globbing  
of some sort - ie, "give me all the columns for column family x"  
without having to first know all the column qualifiers. I guess you  
could do something like leave off the ":", which means the entire thing.

Would that satisfy your needs? If so, we should create a new JIRA for  
the feature of adding family globbing to getMulti.

-Bryan

On May 20, 2008, at 10:55 AM, Ryan Lynch wrote:

> I have a use case in which we want to access all the columns for a
> supplied column family while also avoiding the overhead of reading any
> other column families.  There seems to be no method for doing this but
> doing a quick dive into the code it "seems" like this should be
> relatively easy to allow. This seems desirable since the architecture
> describes column families being stored together so reading only a  
> single
> column family should be a lighter operation.  Is this worthy of a JIRA
> issue and patch?
>
>
>
> Regards,
>
> Ryan Lynch
>

Reply | Threaded
Open this post in threaded view
|

Re: HTable.getRow() for only a column family?

Bryan Duxbury-2
Yes, I'm sorry. It's in 0.2. Please file a jira.

-Bryan

On May 20, 2008, at 2:23 PM, Ryan Lynch wrote:

> Yes that would be very helpful. Looking at the code for
> HTable.getRow(...) it ultimately calls HRegion.getFull(Text, long)  
> which
> actually iterates over each column family to retrieve the results for
> getRow().  If it really is as simple as that I would be more than  
> happy
> to submit a JIRA with a patch.
>
> I don't see the getMulti call.  Is that part of 0.2?
>
> Regards,
> Ryan
>
> -----Original Message-----
> From: Bryan Duxbury [mailto:[hidden email]]
> Sent: Tuesday, May 20, 2008 11:00 AM
> To: [hidden email]
> Subject: Re: HTable.getRow() for only a column family?
>
> I was thinking this is something people would want to do. Currently,
> there's getMulti, which takes an array of columns you want to
> retrieve. The only thing it doesn't do is have support for globbing
> of some sort - ie, "give me all the columns for column family x"
> without having to first know all the column qualifiers. I guess you
> could do something like leave off the ":", which means the entire  
> thing.
>
> Would that satisfy your needs? If so, we should create a new JIRA for
> the feature of adding family globbing to getMulti.
>
> -Bryan
>
> On May 20, 2008, at 10:55 AM, Ryan Lynch wrote:
>
>> I have a use case in which we want to access all the columns for a
>> supplied column family while also avoiding the overhead of reading  
>> any
>> other column families.  There seems to be no method for doing this  
>> but
>> doing a quick dive into the code it "seems" like this should be
>> relatively easy to allow. This seems desirable since the architecture
>> describes column families being stored together so reading only a
>> single
>> column family should be a lighter operation.  Is this worthy of a  
>> JIRA
>> issue and patch?
>>
>>
>>
>> Regards,
>>
>> Ryan Lynch
>>
>