aboutsummaryrefslogtreecommitdiff
path: root/weed/shell/command_ec_balance.go
diff options
context:
space:
mode:
authorChris Lu <chris.lu@gmail.com>2019-06-01 02:00:18 -0700
committerChris Lu <chris.lu@gmail.com>2019-06-01 02:00:18 -0700
commitd6e2c877fad37db0a21658cd4ce24ae93817ab3e (patch)
tree6359adf779a0d6a7578f48a2f64ac0bc1615e84e /weed/shell/command_ec_balance.go
parent133b772fb5c8df6b4455c6f457800d4baa309518 (diff)
downloadseaweedfs-d6e2c877fad37db0a21658cd4ce24ae93817ab3e.tar.xz
seaweedfs-d6e2c877fad37db0a21658cd4ce24ae93817ab3e.zip
ec.balance: use specific collection names
Diffstat (limited to 'weed/shell/command_ec_balance.go')
-rw-r--r--weed/shell/command_ec_balance.go10
1 files changed, 3 insertions, 7 deletions
diff --git a/weed/shell/command_ec_balance.go b/weed/shell/command_ec_balance.go
index a3d097036..fcfe616c1 100644
--- a/weed/shell/command_ec_balance.go
+++ b/weed/shell/command_ec_balance.go
@@ -26,7 +26,7 @@ func (c *commandEcBalance) Name() string {
func (c *commandEcBalance) Help() string {
return `balance all ec shards among volume servers
- ec.balance [-c ALL|EACH_COLLECTION|<collection_name>] [-f]
+ ec.balance [-c EACH_COLLECTION|<collection_name>] [-f] [-dataCenter <data_center>]
Algorithm:
@@ -56,9 +56,9 @@ func (c *commandEcBalance) Help() string {
func (c *commandEcBalance) Do(args []string, commandEnv *commandEnv, writer io.Writer) (err error) {
balanceCommand := flag.NewFlagSet(c.Name(), flag.ContinueOnError)
- collection := balanceCommand.String("c", "EACH_COLLECTION", "collection name, or use \"ALL_COLLECTIONS\" across collections, \"EACH_COLLECTION\" for each collection")
+ collection := balanceCommand.String("c", "EACH_COLLECTION", "collection name, or use \"EACH_COLLECTION\" for each collection")
dc := balanceCommand.String("dataCenter", "", "only apply the balancing for this dataCenter")
- applyBalancing := balanceCommand.Bool("f", false, "apply the balancing plan.")
+ applyBalancing := balanceCommand.Bool("f", false, "apply the balancing plan")
if err = balanceCommand.Parse(args); err != nil {
return nil
}
@@ -94,10 +94,6 @@ func (c *commandEcBalance) Do(args []string, commandEnv *commandEnv, writer io.W
return err
}
}
- } else if *collection == "ALL" {
- if err = balanceEcVolumes(commandEnv, "ALL", *applyBalancing); err != nil {
- return err
- }
} else {
if err = balanceEcVolumes(commandEnv, *collection, *applyBalancing); err != nil {
return err