Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
4c4b078
make consistent_hash_ring private
bryevdv Jul 11, 2019
038db50
make default_retry_policy private
bryevdv Jul 11, 2019
51d4466
make endpoint_discovery_retry_policy private
bryevdv Jul 11, 2019
b1719fe
make hash_partition_resolver private
bryevdv Jul 11, 2019
46e7fed
make location_cache private
bryevdv Jul 11, 2019
bff6cc9
make murmur_hash private
bryevdv Jul 11, 2019
0e100af
make range private
bryevdv Jul 11, 2019
3d2e65c
make range_partition_resolver private
bryevdv Jul 11, 2019
3e43f69
make vector_session_token private
bryevdv Jul 16, 2019
60ad7fb
make resource_throttle_retry_policy private
bryevdv Jul 16, 2019
68fd7a9
make retry_utility private
bryevdv Jul 16, 2019
8e9274c
make utils private
bryevdv Jul 16, 2019
6dad678
make routing private
bryevdv Jul 17, 2019
6b1a641
make execution_context private
bryevdv Jul 18, 2019
ce36df2
make cosmos_client_connection private
bryevdv Jul 18, 2019
2063355
make retry_options private
bryevdv Jul 18, 2019
8e84029
make query_iterable private
bryevdv Jul 18, 2019
eedb532
make constants private
bryevdv Jul 19, 2019
56c074a
make synchronized_request private
bryevdv Jul 19, 2019
109e496
make session_retry_policy private
bryevdv Jul 19, 2019
c94dc6d
make partition private
bryevdv Jul 19, 2019
4502740
make global_endpoint_manager private
bryevdv Jul 19, 2019
0a60acf
make runtime_constants private
bryevdv Jul 19, 2019
4fb54ac
make session private
bryevdv Jul 19, 2019
2a41dfc
make request_object private
bryevdv Jul 19, 2019
444d5d5
make base private
bryevdv Jul 23, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
make partition private
  • Loading branch information
bryevdv committed Jul 19, 2019
commit c94dc6df235408c4fed26ae47ba3c542e514d494
6 changes: 3 additions & 3 deletions sdk/cosmos/azure-cosmos/azure/cosmos/_consistent_hash_ring.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
import six
from six.moves import xrange

from . import partition
from . import _partition


class ConsistentHashRing(object):
Expand Down Expand Up @@ -79,13 +79,13 @@ def _ConstructPartitions(self, collection_links, partitions_per_node):
using the hashing algorithm and then finally sorting the partitions based on the hash value.
"""
collections_node_count = len(collection_links)
partitions = [partition._Partition() for _ in xrange(0, partitions_per_node * collections_node_count)]
partitions = [_partition.Partition() for _ in xrange(0, partitions_per_node * collections_node_count)]

index = 0
for collection_node in collection_links:
hash_value = self.hash_generator.ComputeHash(self._GetBytes(collection_node))
for _ in xrange(0, partitions_per_node):
partitions[index] = partition._Partition(hash_value, collection_node)
partitions[index] = _partition.Partition(hash_value, collection_node)
index += 1
hash_value = self.hash_generator.ComputeHash(hash_value)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

from six.moves import xrange

class _Partition(object):
class Partition(object):
"""Represents a class that holds the hash value and node name for each partition.
"""
def __init__(self, hash_value = None, node = None):
Expand Down