code
stringlengths
3
6.57k
dict((name, meta)
self.keyspaces.items()
self._keyspace_removed(ksname)
_update_keyspace(self, keyspace_meta, new_user_types=None)
self.keyspaces.get(ks_name, None)
if (keyspace_meta.replication_strategy != old_keyspace_meta.replication_strategy)
self._keyspace_updated(ks_name)
self._keyspace_added(ks_name)
_drop_keyspace(self, keyspace)
self.keyspaces.pop(keyspace, None)
self._keyspace_removed(keyspace)
_update_table(self, meta)
isinstance(meta, TableMetadata)
keyspace_meta._add_table_metadata(meta)
keyspace_meta._add_view_metadata(meta)
_drop_table(self, keyspace, table)
keyspace_meta._drop_table_metadata(table)
_update_type(self, type_meta)
_drop_type(self, keyspace, type)
user_types.pop(type, None)
_update_function(self, function_meta)
_drop_function(self, keyspace, function)
functions.pop(function.signature, None)
_update_aggregate(self, aggregate_meta)
_drop_aggregate(self, keyspace, aggregate)
aggregates.pop(aggregate.signature, None)
_keyspace_added(self, ksname)
self.token_map.rebuild_keyspace(ksname, build_if_absent=False)
_keyspace_updated(self, ksname)
self.token_map.rebuild_keyspace(ksname, build_if_absent=False)
_keyspace_removed(self, ksname)
self.token_map.remove_keyspace(ksname)
rebuild_token_map(self, partitioner, token_map)
partitioner.endswith('RandomPartitioner')
partitioner.endswith('Murmur3Partitioner')
partitioner.endswith('ByteOrderedPartitioner')
six.iteritems(token_map)
token_class.from_string(token_string)
ring.append(token)
sorted(ring)
get_replicas(self, keyspace, key)
t.get_replicas(keyspace, t.token_class.from_key(key)
can_support_partitioner(self)
self.partitioner.endswith('Murmur3Partitioner')
add_or_return_host(self, host)
tuple (host, new)
remove_host(self, host)
bool(self._hosts.pop(host.endpoint, False)
get_host(self, endpoint_or_address)
isinstance(endpoint_or_address, EndPoint)
self._get_host_by_address(endpoint_or_address)
self._hosts.get(endpoint_or_address)
_get_host_by_address(self, address)
six.itervalues(self._hosts)
all_hosts(self)
list(self._hosts.values()
trim_if_startswith(s, prefix)
s.startswith(prefix)
len(prefix)
ReplicationStrategyTypeType(type)
__new__(metacls, name, bases, dct)
dct.setdefault('name', name)
type.__new__(metacls, name, bases, dct)
name.startswith('_')
six.add_metaclass(ReplicationStrategyTypeType)
_ReplicationStrategy(object)
create(cls, strategy_class, options_map)
trim_if_startswith(strategy_class, REPLICATION_STRATEGY_CLASS_PREFIX)
_replication_strategies.get(strategy_name, None)
_UnknownStrategyBuilder(strategy_name)
rs_class(options_map)
log.warning("Failed creating %s with options %s: %s", strategy_name, options_map, exc)
make_token_replica_map(self, token_to_host_owner, ring)
NotImplementedError()
export_for_schema(self)
NotImplementedError()
_UnknownStrategyBuilder(object)
__init__(self, name)
__call__(self, options_map)
_UnknownStrategy(self.name, options_map)
_UnknownStrategy(ReplicationStrategy)
__init__(self, name, options_map)
options_map.copy()
dict()
__eq__(self, other)
return (isinstance(other, _UnknownStrategy)
export_for_schema(self)
dict((str(key)
str(value)
self.options_map.items()
make_token_replica_map(self, token_to_host_owner, ring)
SimpleStrategy(ReplicationStrategy)
__init__(self, options_map)
int(options_map['replication_factor'])
ValueError("SimpleStrategy requires an integer 'replication_factor' option")
make_token_replica_map(self, token_to_host_owner, ring)
range(len(ring)
list()
len(hosts)
len(ring)