hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vaibhav Puranik <vpura...@gmail.com>
Subject Re: Iterating over all cells in HBase
Date Fri, 27 Mar 2009 22:13:20 GMT
Ryan,

The entrySet worked, Thanks!

Vaibhav

On Fri, Mar 27, 2009 at 1:40 PM, Ryan Rawson <ryanobjc@gmail.com> wrote:

> The RowResult class contains what you are looking for...
>
> you want 'entrySet()' which contains byte[] -> Cell, where byte[] = column
> name, Cell = value & timestamp of the data.
>
> Good luck!
> -ryan
>
> On Fri, Mar 27, 2009 at 1:28 PM, Vaibhav Puranik <vpuranik@gmail.com>
> wrote:
>
> > Hi all,
> >
> > One more newbie question.
> >
> > Is there any way to iterate over all the cells (values of all column
> > families:all columns) of a given table without knowing what columns there
> > are?
> > (I am still struggling with whether a column is data or metadata)
> >
> > I looked into apis for HTable, HTableDescriptor, HColumnDescriptor but
> > couldn't find anything to get columns.
> >
> > tables.each {tableDescriptor ->
> >    families = tableDescriptor.getFamilies()
> >    families.each {family ->
> >        print family.getNameAsString()
> >    }
> > }
> >
> > Can anyone suggest a method in HColumnDescriptor that can give me all the
> > column names?
> >
> > Is it unusual to iterate over all column, all rows in a given HBase
> table?
> > We were thinking of doing that to populate memcached.
> >
> > Regards,
> > Vaibhav
> >
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message