hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vijay <vijay2...@gmail.com>
Subject Re: Insert in Hbase - begginer/basic question
Date Mon, 01 Jun 2009 03:33:43 GMT
Thanks Stack that helped!..... Another question (this will clarify most of
my confusions), can we create index on the subcolumns? and will it be
optimal if we are searching for the items in the column family?

like the index on columnFamily:colum1
and columnFamily:colum1:subcol2
 .... I am asking this to know if i can logically seperate it....

Thanks and Regards,
</VJ>




On Sat, May 30, 2009 at 2:05 PM, stack <stack@duboce.net> wrote:

> The below looks fine.  Its the only way to do multiple columns per row.
> St.Ack
>
> On Fri, May 29, 2009 at 11:30 AM, Vijay <vijay2win@gmail.com> wrote:
>
> > Hi,
> > Have a question, I see the hbase shell allows me to create multiple
> > columns... is it optimal for me to insert a small set of data in every
> row
> > and scale it to billions of row? the problem is the query can be on any
> > column/ column's....
> > i was planning to update the following table. with 15 rows and i wanted
> to
> > update those in batch and retive it.... is the following syntax on my
> java
> > program right?
> >
> >
> >       HBaseConfiguration config = new HBaseConfiguration();
> >        HTable tab = new HTable(config, "xxxxxxxxx");
> >        BatchUpdate batchUpdate = new BatchUpdate();
> >        batchUpdate.put("col1", val1);
> >        batchUpdate.put("col2", val2);
> >        batchUpdate.put("col3", val3);
> >        batchUpdate.put("col4", val4);
> >        batchUpdate.put("col5", val5);
> > ...........................
> >        lst.add(batchUpdate);
> >        tab.commit(lst);
> >
> > Basically i wanted to know if this is optimal.... or should i design my
> > data
> > in some other way? I am kind of confused because i read diffrent kinds of
> > things everyday abt doing it :)
> >
> > Thanks a lot for the help....
> >
> > Regards,
> > </VJ>
> >
>

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