ec encode distribute ec data and parity shards evenly
This commit is contained in:
@@ -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