aboutsummaryrefslogtreecommitdiff
path: root/weed/shell
diff options
context:
space:
mode:
authorChris Lu <chris.lu@gmail.com>2019-05-30 09:27:23 -0700
committerChris Lu <chris.lu@gmail.com>2019-05-30 09:27:23 -0700
commit1d111d6ce80727f2c0a25b36b85102d5cb5ae612 (patch)
tree5cd1b3f55a9a37798b97ec23c55ab08dcb4355b9 /weed/shell
parente941d0c2f471fcecede4a8efd6ac6a4895454275 (diff)
downloadseaweedfs-1d111d6ce80727f2c0a25b36b85102d5cb5ae612.tar.xz
seaweedfs-1d111d6ce80727f2c0a25b36b85102d5cb5ae612.zip
collection list normal and ec volumes
Diffstat (limited to 'weed/shell')
-rw-r--r--weed/shell/command_collection_list.go9
-rw-r--r--weed/shell/command_ec_balance.go2
-rw-r--r--weed/shell/command_volume_balance.go2
3 files changed, 8 insertions, 5 deletions
diff --git a/weed/shell/command_collection_list.go b/weed/shell/command_collection_list.go
index 008a83e14..d1124adde 100644
--- a/weed/shell/command_collection_list.go
+++ b/weed/shell/command_collection_list.go
@@ -24,7 +24,7 @@ func (c *commandCollectionList) Help() string {
func (c *commandCollectionList) Do(args []string, commandEnv *commandEnv, writer io.Writer) (err error) {
- collections, err := ListCollectionNames(commandEnv)
+ collections, err := ListCollectionNames(commandEnv, true, true)
if err != nil {
return err
@@ -39,11 +39,14 @@ func (c *commandCollectionList) Do(args []string, commandEnv *commandEnv, writer
return nil
}
-func ListCollectionNames(commandEnv *commandEnv) (collections []string, err error) {
+func ListCollectionNames(commandEnv *commandEnv, includeNormalVolumes, includeEcVolumes bool) (collections []string, err error) {
var resp *master_pb.CollectionListResponse
ctx := context.Background()
err = commandEnv.masterClient.WithClient(ctx, func(client master_pb.SeaweedClient) error {
- resp, err = client.CollectionList(ctx, &master_pb.CollectionListRequest{})
+ resp, err = client.CollectionList(ctx, &master_pb.CollectionListRequest{
+ IncludeNormalVolumes: includeNormalVolumes,
+ IncludeEcVolumes: includeEcVolumes,
+ })
return err
})
if err != nil {
diff --git a/weed/shell/command_ec_balance.go b/weed/shell/command_ec_balance.go
index b2e3ccaea..779d9ecd7 100644
--- a/weed/shell/command_ec_balance.go
+++ b/weed/shell/command_ec_balance.go
@@ -83,7 +83,7 @@ func (c *commandEcBalance) Do(args []string, commandEnv *commandEnv, writer io.W
}
if *collection == "EACH_COLLECTION" {
- collections, err := ListCollectionNames(commandEnv)
+ collections, err := ListCollectionNames(commandEnv, false, true)
if err != nil {
return err
}
diff --git a/weed/shell/command_volume_balance.go b/weed/shell/command_volume_balance.go
index ed1e26d42..f440dc5d2 100644
--- a/weed/shell/command_volume_balance.go
+++ b/weed/shell/command_volume_balance.go
@@ -84,7 +84,7 @@ func (c *commandVolumeBalance) Do(args []string, commandEnv *commandEnv, writer
continue
}
if *collection == "EACH_COLLECTION" {
- collections, err := ListCollectionNames(commandEnv)
+ collections, err := ListCollectionNames(commandEnv, true, false)
if err != nil {
return err
}