diff options
Diffstat (limited to 'weed/shell')
| -rw-r--r-- | weed/shell/command_cluster_ps.go | 3 | ||||
| -rw-r--r-- | weed/shell/shell_liner.go | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/weed/shell/command_cluster_ps.go b/weed/shell/command_cluster_ps.go index ff92064db..5ed1677c8 100644 --- a/weed/shell/command_cluster_ps.go +++ b/weed/shell/command_cluster_ps.go @@ -4,6 +4,7 @@ import ( "context" "flag" "fmt" + "github.com/chrislusf/seaweedfs/weed/cluster" "io" "github.com/chrislusf/seaweedfs/weed/pb/master_pb" @@ -37,7 +38,7 @@ func (c *commandClusterPs) Do(args []string, commandEnv *CommandEnv, writer io.W err = commandEnv.MasterClient.WithClient(func(client master_pb.SeaweedClient) error { resp, err := client.ListClusterNodes(context.Background(), &master_pb.ListClusterNodesRequest{ - ClientType: "filer", + ClientType: cluster.FilerType, }) fmt.Fprintf(writer, "the cluster has %d filers\n", len(resp.ClusterNodes)) diff --git a/weed/shell/shell_liner.go b/weed/shell/shell_liner.go index fed62aba1..caf8da859 100644 --- a/weed/shell/shell_liner.go +++ b/weed/shell/shell_liner.go @@ -3,6 +3,7 @@ package shell import ( "context" "fmt" + "github.com/chrislusf/seaweedfs/weed/cluster" "github.com/chrislusf/seaweedfs/weed/pb" "github.com/chrislusf/seaweedfs/weed/pb/filer_pb" "github.com/chrislusf/seaweedfs/weed/pb/master_pb" @@ -54,7 +55,7 @@ func RunShell(options ShellOptions) { var filers []pb.ServerAddress commandEnv.MasterClient.WithClient(func(client master_pb.SeaweedClient) error { resp, err := client.ListClusterNodes(context.Background(), &master_pb.ListClusterNodesRequest{ - ClientType: "filer", + ClientType: cluster.FilerType, }) if err != nil { return err |
