Compare commits

...

2 commits

Author SHA1 Message Date
cc5d36c5af [#190] Introduce default EC placement policy
The default policy which is similar to REP 2, but uses EC instead.

Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2024-03-26 13:42:26 +03:00
2c8a609d62 [#190] Add PlacementPolicy dataclass
Allow to parametrize tests with placement policy.

Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2024-03-26 13:42:26 +03:00
2 changed files with 14 additions and 0 deletions

View file

@ -95,6 +95,7 @@ class StorageContainer:
DEFAULT_PLACEMENT_RULE = "REP 2 IN X CBF 1 SELECT 4 FROM * AS X"
SINGLE_PLACEMENT_RULE = "REP 1 IN X CBF 1 SELECT 4 FROM * AS X"
REP_2_FOR_3_NODES_PLACEMENT_RULE = "REP 2 IN X CBF 1 SELECT 3 FROM * AS X"
DEFAULT_EC_PLACEMENT_RULE = "EC 3.1"
@reporter.step("Create Container")

View file

@ -0,0 +1,13 @@
from dataclasses import dataclass
@dataclass
class PlacementPolicy:
name: str
value: str
def __str__(self) -> str:
return self.name
def __repr__(self) -> str:
return self.__str__()