Re: CREATE COLUMNFAMILY
That is fine. You just have to be careful that you haven't already inserted data which would be rejected by the type you update to, as a client will have issues reading that data back. -Jeremiah On Nov 11, 2012, at 4:09 PM, Kevin Burton wrote: > What happens when you are mainly concerned about the human readable formats? > Say initially you don’t supply metadata for a key like foo in the column > family, but you get tired of seeing binary data displayed for the values so > you update the column family to get a more human readable format by adding > metadata for foo. Will this work? > > From: aaron morton [mailto:aa...@thelastpickle.com] > Sent: Sunday, November 11, 2012 3:39 PM > To: user@cassandra.apache.org > Subject: Re: CREATE COLUMNFAMILY > > Also most idomatic clients use the information so they can return the > appropriate type to you. > > Can the metadata be applied > after the fact? If so how? > UPDATE COLUMN FAMILY in the CLI will let you change it. > Note that we do not update the existing data. This can be a problem if you do > something like change a variable length integer to a fixed length one. > > Cheers > > - > Aaron Morton > Freelance Developer > @aaronmorton > http://www.thelastpickle.com > > On 12/11/2012, at 8:06 AM, Kevin Burton wrote: > > > Thank you this helps with my understanding. > > So the goal here is to supply as many name/type pairs as can be reasonably > be foreseen when the column family is created? Can the metadata be applied > after the fact? If so how? > > -Original Message- > From: Edward Capriolo [mailto:edlinuxg...@gmail.com] > Sent: Sunday, November 11, 2012 9:37 AM > To: user@cassandra.apache.org > Subject: Re: CREATE COLUMNFAMILY > > If you supply metadata cassandra can use it for several things. > > 1) It validates data on insertion > 2) Helps display the information in human readable formats in tools like the > CLI and sstabletojson > 3) If you add a built-in secondary index the type information is needed, > strings sort differently then integer > 4) columns in rows are sorted by the column name, strings sort differently > then integers > > On Sat, Nov 10, 2012 at 11:55 PM, Kevin Burton > wrote: > > I am sure this has been asked before but what is the purpose of > entering key/value or more correctly key name/data type values on the > CREATE COLUMNFAMILY command. > > > > >
RE: CREATE COLUMNFAMILY
What happens when you are mainly concerned about the human readable formats? Say initially you don't supply metadata for a key like foo in the column family, but you get tired of seeing binary data displayed for the values so you update the column family to get a more human readable format by adding metadata for foo. Will this work? From: aaron morton [mailto:aa...@thelastpickle.com] Sent: Sunday, November 11, 2012 3:39 PM To: user@cassandra.apache.org Subject: Re: CREATE COLUMNFAMILY Also most idomatic clients use the information so they can return the appropriate type to you. Can the metadata be applied after the fact? If so how? UPDATE COLUMN FAMILY in the CLI will let you change it. Note that we do not update the existing data. This can be a problem if you do something like change a variable length integer to a fixed length one. Cheers - Aaron Morton Freelance Developer @aaronmorton http://www.thelastpickle.com On 12/11/2012, at 8:06 AM, Kevin Burton wrote: Thank you this helps with my understanding. So the goal here is to supply as many name/type pairs as can be reasonably be foreseen when the column family is created? Can the metadata be applied after the fact? If so how? -Original Message- From: Edward Capriolo [mailto:edlinuxg...@gmail.com] Sent: Sunday, November 11, 2012 9:37 AM To: user@cassandra.apache.org Subject: Re: CREATE COLUMNFAMILY If you supply metadata cassandra can use it for several things. 1) It validates data on insertion 2) Helps display the information in human readable formats in tools like the CLI and sstabletojson 3) If you add a built-in secondary index the type information is needed, strings sort differently then integer 4) columns in rows are sorted by the column name, strings sort differently then integers On Sat, Nov 10, 2012 at 11:55 PM, Kevin Burton wrote: I am sure this has been asked before but what is the purpose of entering key/value or more correctly key name/data type values on the CREATE COLUMNFAMILY command.
Re: CREATE COLUMNFAMILY
Also most idomatic clients use the information so they can return the appropriate type to you. > Can the metadata be applied > after the fact? If so how? UPDATE COLUMN FAMILY in the CLI will let you change it. Note that we do not update the existing data. This can be a problem if you do something like change a variable length integer to a fixed length one. Cheers - Aaron Morton Freelance Developer @aaronmorton http://www.thelastpickle.com On 12/11/2012, at 8:06 AM, Kevin Burton wrote: > Thank you this helps with my understanding. > > So the goal here is to supply as many name/type pairs as can be reasonably > be foreseen when the column family is created? Can the metadata be applied > after the fact? If so how? > > -Original Message- > From: Edward Capriolo [mailto:edlinuxg...@gmail.com] > Sent: Sunday, November 11, 2012 9:37 AM > To: user@cassandra.apache.org > Subject: Re: CREATE COLUMNFAMILY > > If you supply metadata cassandra can use it for several things. > > 1) It validates data on insertion > 2) Helps display the information in human readable formats in tools like the > CLI and sstabletojson > 3) If you add a built-in secondary index the type information is needed, > strings sort differently then integer > 4) columns in rows are sorted by the column name, strings sort differently > then integers > > On Sat, Nov 10, 2012 at 11:55 PM, Kevin Burton > wrote: >> I am sure this has been asked before but what is the purpose of >> entering key/value or more correctly key name/data type values on the >> CREATE COLUMNFAMILY command. >> >> >> >> >
RE: CREATE COLUMNFAMILY
Thank you this helps with my understanding. So the goal here is to supply as many name/type pairs as can be reasonably be foreseen when the column family is created? Can the metadata be applied after the fact? If so how? -Original Message- From: Edward Capriolo [mailto:edlinuxg...@gmail.com] Sent: Sunday, November 11, 2012 9:37 AM To: user@cassandra.apache.org Subject: Re: CREATE COLUMNFAMILY If you supply metadata cassandra can use it for several things. 1) It validates data on insertion 2) Helps display the information in human readable formats in tools like the CLI and sstabletojson 3) If you add a built-in secondary index the type information is needed, strings sort differently then integer 4) columns in rows are sorted by the column name, strings sort differently then integers On Sat, Nov 10, 2012 at 11:55 PM, Kevin Burton wrote: > I am sure this has been asked before but what is the purpose of > entering key/value or more correctly key name/data type values on the > CREATE COLUMNFAMILY command. > > > >
Re: CREATE COLUMNFAMILY
If you supply metadata cassandra can use it for several things. 1) It validates data on insertion 2) Helps display the information in human readable formats in tools like the CLI and sstabletojson 3) If you add a built-in secondary index the type information is needed, strings sort differently then integer 4) columns in rows are sorted by the column name, strings sort differently then integers On Sat, Nov 10, 2012 at 11:55 PM, Kevin Burton wrote: > I am sure this has been asked before but what is the purpose of entering > key/value or more correctly key name/data type values on the CREATE > COLUMNFAMILY command. > > > >
Re: Create columnFamily
You've set a comparator for the super column names, but not the sub columns. e.g. [default@dev] set data['31']['address']['city']='noida'; org.apache.cassandra.db.marshal.MarshalException: cannot parse 'city' as hex bytes [default@dev] set data['31']['address'][utf8('city')]='noida'; Value inserted. Hope that helps. - Aaron Morton Freelance Cassandra Developer @aaronmorton http://www.thelastpickle.com On 21 Jun 2011, at 19:06, Vivek Mishra wrote: > I understand that I might be missing something on my end. But somehow I > cannot get this working using Cassandra-cli: > > [default@key1] create column family supusers with comparator=UTF8Type and > default_validation_class=UTF8Type and key_validation_class=UTF8Type and > column_type=Super; > > 59e2e950-9bd4-11e0--242d50cf1fbf > Waiting for schema agreement... > ... schemas agree across the cluster > > SuperColumn family got created. > > Issued > [default@key1] assume supusers keys as ascii; > > But still it is failing for: > > [default@key1] set supusers['31']['address']['city']='noida'; > > org.apache.cassandra.db.marshal.MarshalException: cannot parse 'city' as hex > bytes > > > Please suggest, what am I doing incorrect here? > > > > > Write to us for a Free Gold Pass to the Cloud Computing Expo, NYC to attend a > live session by Head of Impetus Labs on ‘Secrets of Building a Cloud Vendor > Agnostic PetaByte Scale Real-time Secure Web Application on the Cloud ‘. > > Looking to leverage the Cloud for your Big Data Strategy ? Attend Impetus > webinar on May 27 by registering at http://www.impetus.com/webinar?eventid=42 > . > > > NOTE: This message may contain information that is confidential, proprietary, > privileged or otherwise protected by law. The message is intended solely for > the named addressee. If received in error, please destroy and notify the > sender. Any use of this email is prohibited when received in error. Impetus > does not represent, warrant and/or guarantee, that the integrity of this > communication has been maintained nor that the communication is free of > errors, virus, interception or interference.
Create columnFamily
I understand that I might be missing something on my end. But somehow I cannot get this working using Cassandra-cli: [default@key1] create column family supusers with comparator=UTF8Type and default_validation_class=UTF8Type and key_validation_class=UTF8Type and column_type=Super; 59e2e950-9bd4-11e0--242d50cf1fbf Waiting for schema agreement... ... schemas agree across the cluster SuperColumn family got created. Issued [default@key1] assume supusers keys as ascii; But still it is failing for: [default@key1] set supusers['31']['address']['city']='noida'; org.apache.cassandra.db.marshal.MarshalException: cannot parse 'city' as hex bytes Please suggest, what am I doing incorrect here? Write to us for a Free Gold Pass to the Cloud Computing Expo, NYC to attend a live session by Head of Impetus Labs on 'Secrets of Building a Cloud Vendor Agnostic PetaByte Scale Real-time Secure Web Application on the Cloud '. Looking to leverage the Cloud for your Big Data Strategy ? Attend Impetus webinar on May 27 by registering at http://www.impetus.com/webinar?eventid=42 . NOTE: This message may contain information that is confidential, proprietary, privileged or otherwise protected by law. The message is intended solely for the named addressee. If received in error, please destroy and notify the sender. Any use of this email is prohibited when received in error. Impetus does not represent, warrant and/or guarantee, that the integrity of this communication has been maintained nor that the communication is free of errors, virus, interception or interference.