Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Cassandra Wiki" for 
change notification.

The "ArchitectureSSTable" page has been changed by DaveBrosius:
http://wiki.apache.org/cassandra/ArchitectureSSTable?action=diff&rev1=5&rev2=6

Comment:
make more sense of serializing index section

  
  When adding a new key to an SSTable here are the steps it goes through. All 
keys are sorted before writing.
  
-  1. Serialize Index  (ColumnIndexer.serialize(IIterableColumns columns, 
DataOutput dos))
+  1. Serialize Index  (!ColumnIndexer.serialize(!IIterableColumns columns, 
!DataOutput dos))
    1. Sort columns for key
    1. Serialize columns bloom filter
     1. Loop through columns and subcolumns that make up for column family
@@ -24, +24 @@

     1. Write serialized bytes of bloom filter
    1. Start indexing based on column family comparator
     1. If columns empty write integer zero, return
-    1. Iterate over columns until getColumnIndexSize() is exceeded (default is 
64KB: Value from yaml's column_index_size_in_kb)
-     1. Construct new !IndexInfo that consists of last column before exceeded, 
existing column name, startPosition and endPosition - startPosition
+    1. Iterator over all columns creating a collection of 
IndexHelper.IndexInfo objects each IndexInfo representing at most 
getColumnIndexSize() worth of data (default is 64KB: Value from yaml's 
column_index_size_in_kb)
+     1. Construct each new !IndexInfo that consists of first and last columns 
visited that fit in the index size limit
     1. Write size of indexSizeInBytes (int)
-    1. Serialize each !IndexInfo object - (firstname is last column name 
before exceeded, and lastname is the existing column name)
+    1. Serialize each !IndexInfo object - (firstname is first column name 
visited in block, and lastname is the last column name visited)
      1. Write byte firstname - (length >> 8) & 0xFF
      1. Write byte firstname - (length & 0xFF)
      1. Write byte firstname
@@ -36, +36 @@

      1. Write byte lastname
      1. Write long startPosition
      1. Write long endPosition - startPosition
-  1. Serialize Data  (ColumnFamilySerializer.serializeForSSTable(ColumnFamily 
columnFamily, DataOutput dos)
+  1. Serialize Data  
(!ColumnFamilySerializer.serializeForSSTable(!ColumnFamily columnFamily, 
!DataOutput dos)
    1. Write columnFamily localDeletionTime (int)
    1. Write columnFamily markedForDeleteAt (long)
    1. Sort columns

Reply via email to