Skip to content

Instantly share code, notes, and snippets.

# In-memory Cassandra-ish thingy... useful for unit tests. Maybe useful for other
# stuff too? No support for SuperColumns, but that should be easy enough to add.
import bisect
import copy
from cassandra.ttypes import NotFoundException, Column, ColumnPath, ColumnOrSuperColumn
class SSTable(object):
#!/usr/bin/python
class List(list):
def dup(self):
def _dup(lst,ancestors):
for orig,copy in ancestors:
if lst == orig:
return copy
copy = lst[:]
_ancestors = ancestors+[(lst,copy)]
for i,x in enumerate(copy):