I'm not doing schema migration, but I suspect my lack of experience and understanding of column-based data is clouding the issue. What I have is 2 pieces of information, let's call them LH and RH and a single long value representing the link between them, S. The data needs to be ordered by S, so the data I have in mind looks like this:
CF { LH1 { S1 { RH1 RH2 RH3 } S2 { RH2 RH3 } } LH2 { S1 { RH1 RH2 } S2 { RH3 RH4 } } } At some point in the application lifecycle an event is received to indicate the S value needs updating for the LH,RH pair. Initially I was thinking of using a second column family as an index, and would look like: LH1 { RH1 : S1 RH2 : S1 ..... } And using that to key into the structure above, but then was trying to figure out if I could bypass the second index completely. For other operations I need to extract the Top X entries for each row key (LH)- does this sound sane or am I still stuck in RDBMS land? On Wed, Mar 24, 2010 at 12:56 PM, Jeremy Dunck <jdu...@gmail.com> wrote: > On Wed, Mar 24, 2010 at 4:57 AM, Colin Vipurs <zodiac...@gmail.com> wrote: > ... >> ColumnFamily { >> 'key1' { >> 'SuperColumn1' { >> 'Column1' : <somevalue> >> 'Column2' : <somevalue> >> } >> 'SuperColumn2' { >> 'Column3' : <somevalue> >> } >> } >> 'key2' { >> 'SuperColumn1' { >> 'Column1' : <somevalue> >> } >> } >> } >> >> Could I get all keys/supercolumns where 'Column1' exists? fyi I'm >> using the Hector Java client for my work. > > I think maybe you're asking because you want to perform schema migration. > > If so, one option is to have client-side code that mutates to the > later schema upon encountering the old schema. > Another option is to have a schema-versioning column, and have a job > that fetches and mutates records w/ the old schema. > > If there are other ways of handling schema migration, I'm curious? > -- Maybe she awoke to see the roommate's boyfriend swinging from the chandelier wearing a boar's head. Something which you, I, and everyone else would call "Tuesday", of course.