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 <[email protected]> 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> >
