Skip to content

Instantly share code, notes, and snippets.

@rsumbaly
Created April 30, 2011 01:53
Show Gist options
  • Save rsumbaly/949334 to your computer and use it in GitHub Desktop.
Save rsumbaly/949334 to your computer and use it in GitHub Desktop.
Current Cluster:
0 - [0, 4] - [3, 7] - [2, 6]
1 - [1, 5] - [0, 4] - [3, 7]
2 - [2, 6] - [1, 5] - [0, 4]
3 - [3, 7] - [2, 6] - [1, 5]
Target Cluster:
0 - [4] - [3] - [2]
1 - [0, 1, 5] - [4, 7] - [3, 6]
2 - [2, 6] - [0, 1, 5] - [4, 7]
3 - [3, 7] - [2, 6] - [0, 1, 5]
MINE
RebalancingStealInfo(1 <--- 0 master partitions :[0] replica partitions :[6, 7] deleted partition :[0, 6, 7] stores:[test])
RebalancingStealInfo(2 <--- 1 master partitions :[] replica partitions :[0, 7] deleted partition :[0, 7] stores:[test])
RebalancingStealInfo(3 <--- 2 master partitions :[] replica partitions :[0] deleted partition :[0]
EDGE CASE 1 => Get rid of case ( from the delete section ) wherein 1 <-- y [ Some replica ] intersects with x <-- 1 [ delete partitions ]
EDGE CASE 2 => Give the exact replica type when moving
OLD
RebalancingStealInfo(1 <--- 0 partitions:[0, 6] steal master partitions:[0] deleted:[6] stores:[test])
RebalancingStealInfo(2 <--- 0 partitions:[7] steal master partitions:[] deleted:[7] stores:[test])
RebalancingStealInfo(3 <--- 0 partitions:[0] steal master partitions:[] deleted:[0] stores:[test])
=================================================
Current Cluster:
0 - [4] - [3] - [2]
1 - [0, 1, 5] - [4, 7] - [3, 6]
2 - [2, 6] - [0, 1, 5] - [4, 7]
3 - [3, 7] - [2, 6] - [0, 1, 5]
Target Cluster:
0 - empty
1 - [0, 1, 5] - [4, 7] - [2, 3, 6]
2 - [2, 4, 6] - [0, 1, 3, 5] - [7]
3 - [3, 7] - [2, 6] - [0, 1, 4, 5]
MINE
RebalancingStealInfo(2 <--- 0 master partitions :[4] replica partitions :[3] deleted partition :[3, 4] stores:[test])
RebalancingStealInfo(1 <--- 0 master partitions :[] replica partitions :[2] deleted partition :[2] stores:[test])
RebalancingStealInfo(3 <--- 2 master partitions :[] replica partitions :[4] deleted partition :[4] stores:[test])
OLD
RebalancingStealInfo(2 <--- 0 partitions:[3, 4] steal master partitions:[4] deleted:[3] stores:[test])
RebalancingStealInfo(1 <--- 0 partitions:[2] steal master partitions:[] deleted:[2] stores:[test])
RebalancingStealInfo(3 <--- 0 partitions:[4] steal master partitions:[] deleted:[4] stores:[test])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment