MCPcopy Create free account
hub / github.com/BIT-DataLab/LakeBench / CassandraSetStorage

Class CassandraSetStorage

join/LSH/datasketch/storage.py:862–877  ·  view source on GitHub ↗

OrderedStorage storage implementation using Cassandra as backend. Note: since we are interested in keeping duplicates or ordered data, we upsert the data ignoring what the timestamp actually means.

Source from the content-addressed store, hash-verified

860
861
862 class CassandraSetStorage(UnorderedStorage, CassandraListStorage):
863 """
864 OrderedStorage storage implementation using Cassandra as backend.
865
866 Note: since we are interested in keeping duplicates or ordered data, we upsert the data
867 ignoring what the timestamp actually means.
868 """
869
870 def get(self, key):
871 """Implement interface and override super-class."""
872 return set(super(CassandraSetStorage, self).get(key))
873
874 def insert(self, key, *vals, **kwargs):
875 """Implement interface and override super-class."""
876 buffer = kwargs.pop('buffer', False)
877 self._client.upsert(key, vals, buffer)
878
879
880if redis is not None:

Callers 1

unordered_storageFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected