MCPcopy Create free account
hub / github.com/apache/cassandra-python-driver / get_replicas

Method get_replicas

cassandra/metadata.py:305–316  ·  view source on GitHub ↗

Returns a list of :class:`.Host` instances that are replicas for a given partition key.

(self, keyspace, key)

Source from the content-addressed store, hash-verified

303 token_class, token_to_host_owner, all_tokens, self)
304
305 def get_replicas(self, keyspace, key):
306 """
307 Returns a list of :class:`.Host` instances that are replicas for a given
308 partition key.
309 """
310 t = self.token_map
311 if not t:
312 return []
313 try:
314 return t.get_replicas(keyspace, t.token_class.from_key(key))
315 except NoMurmur3:
316 return []
317
318 def can_support_partitioner(self):
319 if self.partitioner.endswith('Murmur3Partitioner') and murmur3 is None:

Callers 2

make_query_planMethod · 0.45
group_keys_by_replicaFunction · 0.45

Calls 1

from_keyMethod · 0.80

Tested by

no test coverage detected