HBase appends

2014-07-21 Thread Arun Allamsetty
Hi, If I have a one-to-many relationship in a SQL database (an author might have written many books), and I want to denormalize it for writing in HBase, I'll have a table with the Author as the row key and a *list* of books as values. Now my question is how do I create a *list* such that I could

Re: HBase appends

2014-07-21 Thread Ishan Chhabra
Arun, You need to represent your data in a format such that you can simply add a byte[] to the end of the existing byte[] in a Cell and later read and decode it as a list. One way is to use the encode your data as protobuf. When you append a list of values in byte[] form in protobuf to an existing

Re: HBase appends

2014-07-22 Thread yonghu
Hi, If a author does not have hundreds of publications, you can directly write in one column. Hence, your column will contain multiple data versions. The default data version is 3 but you can send more. On Tue, Jul 22, 2014 at 4:20 AM, Ishan Chhabra wrote: > Arun, > You need to represent your

Re: HBase appends

2014-07-22 Thread Arun Allamsetty
Hi, Isn't versioning used for an entirely different purpose? What if I screw up a book name and then have to rewrite it? Then I'll have two versions for the same book. Also, AFAIK the default number of versions is 1 on table creation without additional parameters. Thanks, Arun On Jul 22, 2014 12:

Re: HBase appends

2014-07-22 Thread Ted Yu
When storing new lists using new columns, similar issue would arise, right ? In Ishan's words: bq. read all the columns and combine when reading The combining process applies to the multi-version approach as well. Cheers On Tue, Jul 22, 2014 at 12:32 PM, Arun Allamsetty wrote: > Hi, > > Isn'

Re: HBase appends

2014-07-22 Thread Arun Allamsetty
That's true. I never thought of it that way. Thanks for pointing it out. Arun On Jul 22, 2014 4:07 PM, "Ted Yu" wrote: > When storing new lists using new columns, similar issue would arise, right > ? > In Ishan's words: > > bq. read all the columns and combine when reading > > The combining proc