aboutsummaryrefslogtreecommitdiff
path: root/weed/command
diff options
context:
space:
mode:
authorhilimd <68371223+hilimd@users.noreply.github.com>2021-11-11 16:00:21 +0800
committerGitHub <noreply@github.com>2021-11-11 16:00:21 +0800
commit34240606f78395345ca7f6d7fe66a223c9bdf072 (patch)
tree914f76c6587989a39fe1c0f421782126248fbe8e /weed/command
parentb5389c3b23502da7315dd258715e146be7cc0fc9 (diff)
parent835e2d2ddf959dc8dd234021ac3cde72bd9e9246 (diff)
downloadseaweedfs-34240606f78395345ca7f6d7fe66a223c9bdf072.tar.xz
seaweedfs-34240606f78395345ca7f6d7fe66a223c9bdf072.zip
Merge pull request #87 from chrislusf/master
sync
Diffstat (limited to 'weed/command')
-rw-r--r--weed/command/filer.go9
-rw-r--r--weed/command/filer_meta_tail.go2
-rw-r--r--weed/command/server.go1
-rw-r--r--weed/command/shell.go7
4 files changed, 5 insertions, 14 deletions
diff --git a/weed/command/filer.go b/weed/command/filer.go
index fdd8cb4f2..633e02d79 100644
--- a/weed/command/filer.go
+++ b/weed/command/filer.go
@@ -4,7 +4,6 @@ import (
"fmt"
"net/http"
"os"
- "strings"
"time"
"google.golang.org/grpc/reflection"
@@ -46,7 +45,6 @@ type FilerOptions struct {
enableNotification *bool
disableHttp *bool
cipher *bool
- peers *string
metricsHttpPort *int
saveToFilerLimit *int
defaultLevelDbDirectory *string
@@ -72,7 +70,6 @@ func init() {
f.rack = cmdFiler.Flag.String("rack", "", "prefer to write to volumes in this rack")
f.disableHttp = cmdFiler.Flag.Bool("disableHttp", false, "disable http request, only gRpc operations are allowed")
f.cipher = cmdFiler.Flag.Bool("encryptVolumeData", false, "encrypt data on volume servers")
- f.peers = cmdFiler.Flag.String("peers", "", "all filers sharing the same filer store in comma separated ip:port list")
f.metricsHttpPort = cmdFiler.Flag.Int("metricsPort", 0, "Prometheus metrics listen port")
f.saveToFilerLimit = cmdFiler.Flag.Int("saveToFilerLimit", 0, "files smaller than this limit will be saved in filer store")
f.defaultLevelDbDirectory = cmdFiler.Flag.String("defaultStoreDir", ".", "if filer.toml is empty, use an embedded filer store in the directory")
@@ -186,11 +183,6 @@ func (fo *FilerOptions) startFiler() {
defaultLevelDbDirectory := util.ResolvePath(*fo.defaultLevelDbDirectory + "/filerldb2")
- var peers []string
- if *fo.peers != "" {
- peers = strings.Split(*fo.peers, ",")
- }
-
filerAddress := pb.NewServerAddress(*fo.ip, *fo.port, *fo.portGrpc)
fs, nfs_err := weed_server.NewFilerServer(defaultMux, publicVolumeMux, &weed_server.FilerOption{
@@ -207,7 +199,6 @@ func (fo *FilerOptions) startFiler() {
Host: filerAddress,
Cipher: *fo.cipher,
SaveToFilerLimit: int64(*fo.saveToFilerLimit),
- Filers: pb.FromAddressStrings(peers),
ConcurrentUploadLimit: int64(*fo.concurrentUploadLimitMB) * 1024 * 1024,
})
if nfs_err != nil {
diff --git a/weed/command/filer_meta_tail.go b/weed/command/filer_meta_tail.go
index cff39fe49..26b155440 100644
--- a/weed/command/filer_meta_tail.go
+++ b/weed/command/filer_meta_tail.go
@@ -30,6 +30,8 @@ var cmdFilerMetaTail = &Command{
weed filer.meta.tail -timeAgo=30h | jq .
weed filer.meta.tail -timeAgo=30h | jq .eventNotification.newEntry.name
+ weed filer.meta.tail -timeAgo=30h -es=http://<elasticSearchServerHost>:<port> -es.index=seaweedfs
+
`,
}
diff --git a/weed/command/server.go b/weed/command/server.go
index a80ef6796..5c6c4b1cf 100644
--- a/weed/command/server.go
+++ b/weed/command/server.go
@@ -106,7 +106,6 @@ func init() {
filerOptions.maxMB = cmdServer.Flag.Int("filer.maxMB", 4, "split files larger than the limit")
filerOptions.dirListingLimit = cmdServer.Flag.Int("filer.dirListLimit", 1000, "limit sub dir listing size")
filerOptions.cipher = cmdServer.Flag.Bool("filer.encryptVolumeData", false, "encrypt data on volume servers")
- filerOptions.peers = cmdServer.Flag.String("filer.peers", "", "all filers sharing the same filer store in comma separated ip:port list")
filerOptions.saveToFilerLimit = cmdServer.Flag.Int("filer.saveToFilerLimit", 0, "Small files smaller than this limit can be cached in filer store.")
filerOptions.concurrentUploadLimitMB = cmdServer.Flag.Int("filer.concurrentUploadLimitMB", 64, "limit total concurrent upload size")
diff --git a/weed/command/shell.go b/weed/command/shell.go
index 93bb69522..3ba51aec1 100644
--- a/weed/command/shell.go
+++ b/weed/command/shell.go
@@ -37,7 +37,7 @@ func runShell(command *Command, args []string) bool {
util.LoadConfiguration("security", false)
shellOptions.GrpcDialOption = security.LoadClientTLS(util.GetViper(), "grpc.client")
- if *shellOptions.Masters == "" && *shellInitialFiler == "" {
+ if *shellOptions.Masters == "" {
util.LoadConfiguration("shell", false)
v := util.GetViper()
cluster := v.GetString("cluster.default")
@@ -45,15 +45,14 @@ func runShell(command *Command, args []string) bool {
cluster = *shellCluster
}
if cluster == "" {
- *shellOptions.Masters, *shellInitialFiler = "localhost:9333", "localhost:8888"
+ *shellOptions.Masters = "localhost:9333"
} else {
*shellOptions.Masters = v.GetString("cluster." + cluster + ".master")
*shellInitialFiler = v.GetString("cluster." + cluster + ".filer")
+ fmt.Printf("master: %s filer: %s\n", *shellOptions.Masters, *shellInitialFiler)
}
}
- fmt.Printf("master: %s filer: %s\n", *shellOptions.Masters, *shellInitialFiler)
-
shellOptions.FilerAddress = pb.ServerAddress(*shellInitialFiler)
shellOptions.Directory = "/"