Commit Graph

6 Commits

Author SHA1 Message Date
Riccardo Pittau 5ac72fcb3d Remove six library
The tooz project doesn't support Python 2 anymore, using the
six library should not be necessary.

Change-Id: I9886cabcd13cbc615065ceb372efbf037dff1aeb
2020-07-01 15:56:53 +02:00
Dmitriy Rabotjagov 17b9e9d42c Fixed UnicodeEncodeError for Python2 unicode objects
On python2 in case of unicode objects, str() was causing UnicodeEncodeError.
Also utf8 encoding as a default (mostly for Python2)

Change-Id: I64373133f65c5b11daa3462b7c21a55d06738c09
2019-02-01 18:11:28 +02:00
Julien Danjou 62fd552e1e partitioner: do not use hash() to determine object identity
The `hash` method is random on Python 3, so it's not consistent between. Just
use the string representation of the object as a default.

Change-Id: I84e2b19b64dc1641f9758429248dc6b928122b18
Closes-Bug: #1743243
2018-01-18 12:05:41 +01:00
Julien Danjou 15f6de65e0 coordination: remove double serialization of capabilities
The capabilities was meant to be a byte string only, but since now all drivers
have been enhanced to serialize the data in a way or another, it accepts
anything. There's no need to pass a byte string anymore.

Change-Id: Ib732dccd18d67edd9e39e990b8ca3a8da7ab5663
2017-06-21 17:43:26 +02:00
gord chung 3994c470d3 get weight of existing members
partitioner does not capture the weight of existing members so
members do not have the same weights for each other depending on
when they joined

Change-Id: Ibb2a9ed92d2b38c4ab888133cf66c14cf8a5a052
2017-03-27 14:38:25 +00:00
Julien Danjou 9ad740fa1e Add partitioner implementation
Add a new object called `Partitioner' which is based on the consistent
hashring implementation of tooz.hashring. The coordinator API allows to
create such an object and to use it to dispatch objects ownership across
several workers.

Change-Id: Iae8c861d5b6c15b714f1ec3bd7090d15dd468421
2017-01-01 19:03:40 +01:00