aboutsummaryrefslogtreecommitdiff
path: root/weed/shell/command_ec_encode_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'weed/shell/command_ec_encode_test.go')
-rw-r--r--weed/shell/command_ec_encode_test.go31
1 files changed, 0 insertions, 31 deletions
diff --git a/weed/shell/command_ec_encode_test.go b/weed/shell/command_ec_encode_test.go
deleted file mode 100644
index 346e2af14..000000000
--- a/weed/shell/command_ec_encode_test.go
+++ /dev/null
@@ -1,31 +0,0 @@
-package shell
-
-import (
- "fmt"
- "github.com/seaweedfs/seaweedfs/weed/storage/erasure_coding"
- "testing"
-)
-
-func TestEcDistribution(t *testing.T) {
-
- topologyInfo := parseOutput(topoData)
-
- // find out all volume servers with one slot left.
- ecNodes, totalFreeEcSlots := collectEcVolumeServersByDc(topologyInfo, "")
-
- sortEcNodesByFreeslotsDescending(ecNodes)
-
- if totalFreeEcSlots < erasure_coding.TotalShardsCount {
- println("not enough free ec shard slots", totalFreeEcSlots)
- }
- allocatedDataNodes := ecNodes
- if len(allocatedDataNodes) > erasure_coding.TotalShardsCount {
- allocatedDataNodes = allocatedDataNodes[:erasure_coding.TotalShardsCount]
- }
-
- for _, dn := range allocatedDataNodes {
- // fmt.Printf("info %+v %+v\n", dn.info, dn)
- fmt.Printf("=> %+v %+v\n", dn.info.Id, dn.freeEcSlot)
- }
-
-}