View RSS Feed


Cassandra Sorting

Rate this Entry
by , 02-23-2012 at 07:04 PM (580 Views)
Along with ColumnFamily CompareWith attribute, sorting gets specified. Here are few options from which one may select.
1. BytesType
2. UTF8Type
3. LexicalUUIDType
4. TimeUUIDType
5. AsciiType
6. LongType

Content of Column names are threatened by each of the mentioned type, being a different data type. For example, Column names are being threat by Longtype as 64 Bit long value. Other examples are that suppose of ColumnFamily where CompareWith is being set with LongType.

Despite sorting types that have been provided you may also add your own customized sorting types. For creation of these make a class which makes the extension of the org.apache.cassandra.db.marshal.AbstractType class. Package your class, in Java Archive, for using it in your configuration file. Add it to Cassandra installationís lib folder. Fully classified classname shall be specified in file of your database configuration, in attribute CompareWith or CompareSubcolumnsWith. It would be making the capabilities of sorting much more powerful.

Submit "Cassandra Sorting" to Facebook Submit "Cassandra Sorting" to Digg Submit "Cassandra Sorting" to Submit "Cassandra Sorting" to StumbleUpon Submit "Cassandra Sorting" to Google