mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-11-28 21:39:02 +08:00
Merge branch 'master' of github.com:chrislusf/weed-fs
This commit is contained in:
commit
5f9efceee3
@ -126,7 +126,8 @@ func ParseUpload(r *http.Request) (fileName string, data []byte, mimeType string
|
|||||||
if ext == ".gz" {
|
if ext == ".gz" {
|
||||||
isGzipped = true
|
isGzipped = true
|
||||||
}
|
}
|
||||||
if strings.HasSuffix(fileName, ".gz") {
|
if strings.HasSuffix(fileName, ".gz") &&
|
||||||
|
!strings.HasSuffix(fileName, ".tar.gz") {
|
||||||
fileName = fileName[:len(fileName)-3]
|
fileName = fileName[:len(fileName)-3]
|
||||||
}
|
}
|
||||||
modifiedTime, _ = strconv.ParseUint(r.FormValue("ts"), 10, 64)
|
modifiedTime, _ = strconv.ParseUint(r.FormValue("ts"), 10, 64)
|
||||||
|
@ -101,5 +101,6 @@ func (dn *DataNode) ToMap() interface{} {
|
|||||||
ret["Max"] = dn.GetMaxVolumeCount()
|
ret["Max"] = dn.GetMaxVolumeCount()
|
||||||
ret["Free"] = dn.FreeSpace()
|
ret["Free"] = dn.FreeSpace()
|
||||||
ret["PublicUrl"] = dn.PublicUrl
|
ret["PublicUrl"] = dn.PublicUrl
|
||||||
|
ret["AdminUrl"] = dn.AdminUrl()
|
||||||
return ret
|
return ret
|
||||||
}
|
}
|
||||||
|
@ -203,7 +203,7 @@ func (vg *VolumeGrowth) grow(topo *Topology, vid storage.VolumeId, option *Volum
|
|||||||
topo.RegisterVolumeLayout(vi, server)
|
topo.RegisterVolumeLayout(vi, server)
|
||||||
glog.V(0).Infoln("Created Volume", vid, "on", server.NodeImpl.String())
|
glog.V(0).Infoln("Created Volume", vid, "on", server.NodeImpl.String())
|
||||||
} else {
|
} else {
|
||||||
glog.V(0).Infoln("Failed to assign", vid, "to", servers, "error", err)
|
glog.V(0).Infoln("Failed to assign volume", vid, "to", servers, "error", err)
|
||||||
return fmt.Errorf("Failed to assign %d: %v", vid, err)
|
return fmt.Errorf("Failed to assign %d: %v", vid, err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -109,6 +109,10 @@ func runServer(cmd *Command, args []string) bool {
|
|||||||
*filerOptions.defaultReplicaPlacement = *masterDefaultReplicaPlacement
|
*filerOptions.defaultReplicaPlacement = *masterDefaultReplicaPlacement
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if *volumeAdminPort == 0 {
|
||||||
|
*volumeAdminPort = *volumePort
|
||||||
|
}
|
||||||
|
|
||||||
if *serverMaxCpu < 1 {
|
if *serverMaxCpu < 1 {
|
||||||
*serverMaxCpu = runtime.NumCPU()
|
*serverMaxCpu = runtime.NumCPU()
|
||||||
}
|
}
|
||||||
@ -172,7 +176,6 @@ func runServer(cmd *Command, args []string) bool {
|
|||||||
)
|
)
|
||||||
if e != nil {
|
if e != nil {
|
||||||
glog.Fatalf("Filer listener error: %v", e)
|
glog.Fatalf("Filer listener error: %v", e)
|
||||||
glog.Fatalf(e.Error())
|
|
||||||
}
|
}
|
||||||
if e := http.Serve(filerListener, r); e != nil {
|
if e := http.Serve(filerListener, r); e != nil {
|
||||||
glog.Fatalf("Filer Fail to serve: %v", e)
|
glog.Fatalf("Filer Fail to serve: %v", e)
|
||||||
@ -229,12 +232,12 @@ func runServer(cmd *Command, args []string) bool {
|
|||||||
)
|
)
|
||||||
|
|
||||||
glog.V(0).Infoln("Start Seaweed volume server", util.VERSION, "at", *serverIp+":"+strconv.Itoa(*volumePort))
|
glog.V(0).Infoln("Start Seaweed volume server", util.VERSION, "at", *serverIp+":"+strconv.Itoa(*volumePort))
|
||||||
volumeListener, e := util.NewListener(
|
volumeListener, eListen := util.NewListener(
|
||||||
*serverBindIp+":"+strconv.Itoa(*volumePort),
|
*serverBindIp+":"+strconv.Itoa(*volumePort),
|
||||||
time.Duration(*serverTimeout)*time.Second,
|
time.Duration(*serverTimeout)*time.Second,
|
||||||
)
|
)
|
||||||
if e != nil {
|
if eListen != nil {
|
||||||
glog.Fatalf("Volume server listener error: %v", e)
|
glog.Fatalf("Volume server listener error: %v", eListen)
|
||||||
}
|
}
|
||||||
|
|
||||||
OnInterrupt(func() {
|
OnInterrupt(func() {
|
||||||
|
Loading…
Reference in New Issue
Block a user