aboutsummaryrefslogtreecommitdiff
path: root/weed/command
diff options
context:
space:
mode:
authorchrislu <chris.lu@gmail.com>2022-09-08 18:03:43 -0700
committerchrislu <chris.lu@gmail.com>2022-09-08 18:03:43 -0700
commit9b084d4c88e85e95a1c7279fcb03297ff6e20ad6 (patch)
tree39fedce5b2b80cb9778a2cff533184444ec4dbed /weed/command
parenteb7cf3de813723984323fff8308ccda1ad31c2fa (diff)
downloadseaweedfs-9b084d4c88e85e95a1c7279fcb03297ff6e20ad6.tar.xz
seaweedfs-9b084d4c88e85e95a1c7279fcb03297ff6e20ad6.zip
purge tcp implementation
Diffstat (limited to 'weed/command')
-rw-r--r--weed/command/server.go1
-rw-r--r--weed/command/volume.go26
2 files changed, 0 insertions, 27 deletions
diff --git a/weed/command/server.go b/weed/command/server.go
index c47b7fa5d..8dfa63e34 100644
--- a/weed/command/server.go
+++ b/weed/command/server.go
@@ -130,7 +130,6 @@ func init() {
serverOptions.v.preStopSeconds = cmdServer.Flag.Int("volume.preStopSeconds", 10, "number of seconds between stop send heartbeats and stop volume server")
serverOptions.v.pprof = cmdServer.Flag.Bool("volume.pprof", false, "enable pprof http handlers. precludes --memprofile and --cpuprofile")
serverOptions.v.idxFolder = cmdServer.Flag.String("volume.dir.idx", "", "directory to store .idx files")
- serverOptions.v.enableTcp = cmdServer.Flag.Bool("volume.tcp", false, "<exprimental> enable tcp port")
serverOptions.v.inflightUploadDataTimeout = cmdServer.Flag.Duration("volume.inflightUploadDataTimeout", 60*time.Second, "inflight upload data wait timeout of volume servers")
s3Options.port = cmdServer.Flag.Int("s3.port", 8333, "s3 server http listen port")
diff --git a/weed/command/volume.go b/weed/command/volume.go
index 3ad8ba1bb..aa300108a 100644
--- a/weed/command/volume.go
+++ b/weed/command/volume.go
@@ -65,7 +65,6 @@ type VolumeServerOptions struct {
preStopSeconds *int
metricsHttpPort *int
// pulseSeconds *int
- enableTcp *bool
inflightUploadDataTimeout *time.Duration
}
@@ -96,7 +95,6 @@ func init() {
v.pprof = cmdVolume.Flag.Bool("pprof", false, "enable pprof http handlers. precludes --memprofile and --cpuprofile")
v.metricsHttpPort = cmdVolume.Flag.Int("metricsPort", 0, "Prometheus metrics listen port")
v.idxFolder = cmdVolume.Flag.String("dir.idx", "", "directory to store .idx files")
- v.enableTcp = cmdVolume.Flag.Bool("tcp", false, "<experimental> enable tcp port")
v.inflightUploadDataTimeout = cmdVolume.Flag.Duration("inflightUploadDataTimeout", 60*time.Second, "inflight upload data wait timeout of volume servers")
}
@@ -258,11 +256,6 @@ func (v VolumeServerOptions) startVolumeServer(volumeFolders, maxVolumeCounts, v
}
}
- // starting tcp server
- if *v.enableTcp {
- go v.startTcpService(volumeServer)
- }
-
// starting the cluster http server
clusterHttpServer := v.startClusterHttpService(volumeMux)
@@ -388,22 +381,3 @@ func (v VolumeServerOptions) startClusterHttpService(handler http.Handler) httpd
}()
return clusterHttpServer
}
-
-func (v VolumeServerOptions) startTcpService(volumeServer *weed_server.VolumeServer) {
- listeningAddress := util.JoinHostPort(*v.bindIp, *v.port+20000)
- glog.V(0).Infoln("Start Seaweed volume server", util.Version(), "tcp at", listeningAddress)
- listener, e := util.NewListener(listeningAddress, 0)
- if e != nil {
- glog.Fatalf("Volume server listener error on %s:%v", listeningAddress, e)
- }
- defer listener.Close()
-
- for {
- c, err := listener.Accept()
- if err != nil {
- fmt.Println(err)
- return
- }
- go volumeServer.HandleTcpConnection(c)
- }
-}