mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-01-19 02:48:24 +00:00
filer: remove customizable grpc port, fixed to filer port + 10000
This commit is contained in:
parent
067b935763
commit
21fe5bde7c
|
@ -23,7 +23,6 @@ type FilerOptions struct {
|
||||||
masters *string
|
masters *string
|
||||||
ip *string
|
ip *string
|
||||||
port *int
|
port *int
|
||||||
grpcPort *int
|
|
||||||
publicPort *int
|
publicPort *int
|
||||||
collection *string
|
collection *string
|
||||||
defaultReplicaPlacement *string
|
defaultReplicaPlacement *string
|
||||||
|
@ -45,7 +44,6 @@ func init() {
|
||||||
f.collection = cmdFiler.Flag.String("collection", "", "all data will be stored in this collection")
|
f.collection = cmdFiler.Flag.String("collection", "", "all data will be stored in this collection")
|
||||||
f.ip = cmdFiler.Flag.String("ip", "", "filer server http listen ip address")
|
f.ip = cmdFiler.Flag.String("ip", "", "filer server http listen ip address")
|
||||||
f.port = cmdFiler.Flag.Int("port", 8888, "filer server http listen port")
|
f.port = cmdFiler.Flag.Int("port", 8888, "filer server http listen port")
|
||||||
f.grpcPort = cmdFiler.Flag.Int("port.grpc", 0, "filer grpc server listen port, default to http port + 10000")
|
|
||||||
f.publicPort = cmdFiler.Flag.Int("port.readonly", 0, "readonly port opened to public")
|
f.publicPort = cmdFiler.Flag.Int("port.readonly", 0, "readonly port opened to public")
|
||||||
f.defaultReplicaPlacement = cmdFiler.Flag.String("defaultReplicaPlacement", "000", "default replication type if not specified")
|
f.defaultReplicaPlacement = cmdFiler.Flag.String("defaultReplicaPlacement", "000", "default replication type if not specified")
|
||||||
f.redirectOnRead = cmdFiler.Flag.Bool("redirectOnRead", false, "whether proxy or redirect to volume server during file GET request")
|
f.redirectOnRead = cmdFiler.Flag.Bool("redirectOnRead", false, "whether proxy or redirect to volume server during file GET request")
|
||||||
|
@ -140,10 +138,7 @@ func (fo *FilerOptions) startFiler() {
|
||||||
}
|
}
|
||||||
|
|
||||||
// starting grpc server
|
// starting grpc server
|
||||||
grpcPort := *fo.grpcPort
|
grpcPort := *fo.port + 10000
|
||||||
if grpcPort == 0 {
|
|
||||||
grpcPort = *fo.port + 10000
|
|
||||||
}
|
|
||||||
grpcL, err := util.NewListener(":"+strconv.Itoa(grpcPort), 0)
|
grpcL, err := util.NewListener(":"+strconv.Itoa(grpcPort), 0)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
glog.Fatalf("failed to listen on grpc port %d: %v", grpcPort, err)
|
glog.Fatalf("failed to listen on grpc port %d: %v", grpcPort, err)
|
||||||
|
|
|
@ -20,7 +20,6 @@ var (
|
||||||
|
|
||||||
type S3Options struct {
|
type S3Options struct {
|
||||||
filer *string
|
filer *string
|
||||||
filerGrpcPort *int
|
|
||||||
filerBucketsPath *string
|
filerBucketsPath *string
|
||||||
port *int
|
port *int
|
||||||
domainName *string
|
domainName *string
|
||||||
|
@ -31,7 +30,6 @@ type S3Options struct {
|
||||||
func init() {
|
func init() {
|
||||||
cmdS3.Run = runS3 // break init cycle
|
cmdS3.Run = runS3 // break init cycle
|
||||||
s3options.filer = cmdS3.Flag.String("filer", "localhost:8888", "filer server address")
|
s3options.filer = cmdS3.Flag.String("filer", "localhost:8888", "filer server address")
|
||||||
s3options.filerGrpcPort = cmdS3.Flag.Int("filer.grpcPort", 0, "filer server grpc port, default to filer http port plus 10000")
|
|
||||||
s3options.filerBucketsPath = cmdS3.Flag.String("filer.dir.buckets", "/buckets", "folder on filer to store all buckets")
|
s3options.filerBucketsPath = cmdS3.Flag.String("filer.dir.buckets", "/buckets", "folder on filer to store all buckets")
|
||||||
s3options.port = cmdS3.Flag.Int("port", 8333, "s3options server http listen port")
|
s3options.port = cmdS3.Flag.Int("port", 8333, "s3options server http listen port")
|
||||||
s3options.domainName = cmdS3.Flag.String("domainName", "", "suffix of the host name, {bucket}.{domainName}")
|
s3options.domainName = cmdS3.Flag.String("domainName", "", "suffix of the host name, {bucket}.{domainName}")
|
||||||
|
|
|
@ -80,7 +80,6 @@ func init() {
|
||||||
serverOptions.cpuprofile = cmdServer.Flag.String("cpuprofile", "", "cpu profile output file")
|
serverOptions.cpuprofile = cmdServer.Flag.String("cpuprofile", "", "cpu profile output file")
|
||||||
filerOptions.collection = cmdServer.Flag.String("filer.collection", "", "all data will be stored in this collection")
|
filerOptions.collection = cmdServer.Flag.String("filer.collection", "", "all data will be stored in this collection")
|
||||||
filerOptions.port = cmdServer.Flag.Int("filer.port", 8888, "filer server http listen port")
|
filerOptions.port = cmdServer.Flag.Int("filer.port", 8888, "filer server http listen port")
|
||||||
filerOptions.grpcPort = cmdServer.Flag.Int("filer.port.grpc", 0, "filer grpc server listen port, default to http port + 10000")
|
|
||||||
filerOptions.publicPort = cmdServer.Flag.Int("filer.port.public", 0, "filer server public http listen port")
|
filerOptions.publicPort = cmdServer.Flag.Int("filer.port.public", 0, "filer server public http listen port")
|
||||||
filerOptions.defaultReplicaPlacement = cmdServer.Flag.String("filer.defaultReplicaPlacement", "", "Default replication type if not specified during runtime.")
|
filerOptions.defaultReplicaPlacement = cmdServer.Flag.String("filer.defaultReplicaPlacement", "", "Default replication type if not specified during runtime.")
|
||||||
filerOptions.redirectOnRead = cmdServer.Flag.Bool("filer.redirectOnRead", false, "whether proxy or redirect to volume server during file GET request")
|
filerOptions.redirectOnRead = cmdServer.Flag.Bool("filer.redirectOnRead", false, "whether proxy or redirect to volume server during file GET request")
|
||||||
|
|
Loading…
Reference in a new issue