mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-10-23 22:40:39 +02:00
ec encode distribute ec data and parity shards evenly
This commit is contained in:
1 parent
9ff72f616a
commit
3ebeae0c0b
3 files changed
+36
-27
No files matched your search
@@ -2,12 +2,25 @@ package shell
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"testing"
|
||||
|
||||
"github.com/chrislusf/seaweedfs/weed/pb/master_pb"
|
||||
"github.com/chrislusf/seaweedfs/weed/storage/needle"
|
||||
)
|
||||
|
||||
func TestCommandEcDistribution(t *testing.T) {
|
||||
|
||||
allEcNodes := []*EcNode{
|
||||
newEcNode("dc1", "rack1", "dn1", 100),
|
||||
newEcNode("dc1", "rack2", "dn2", 100),
|
||||
}
|
||||
|
||||
allocated := balancedEcDistribution(allEcNodes)
|
||||
|
||||
fmt.Printf("allocated: %+v", allocated)
|
||||
}
|
||||
|
||||
func TestCommandEcBalanceSmall(t *testing.T) {
|
||||
|
||||
allEcNodes := []*EcNode{
|
||||
|
||||
Reference in new issue
Block a user