Browse Source

update

pull/279/head
tnextday 10 years ago
parent
commit
9fcfcdb99c
  1. 2
      weed/topology/volume_growth_test.go
  2. 4
      weed/weedserver/master_server.go
  3. 3
      weed/weedserver/volume_server.go

2
weed/topology/volume_growth_test.go

@ -141,7 +141,7 @@ func setup(topologyLayout string) *Topology {
rack.LinkChildNode(server) rack.LinkChildNode(server)
for _, v := range serverMap["volumes"].([]interface{}) { for _, v := range serverMap["volumes"].([]interface{}) {
m := v.(map[string]interface{}) m := v.(map[string]interface{})
vi := storage.VolumeInfo{
vi := &storage.VolumeInfo{
Id: storage.VolumeId(int64(m["id"].(float64))), Id: storage.VolumeId(int64(m["id"].(float64))),
Size: uint64(m["size"].(float64)), Size: uint64(m["size"].(float64)),
Version: storage.CurrentVersion} Version: storage.CurrentVersion}

4
weed/weedserver/master_server.go

@ -84,8 +84,10 @@ func NewMasterServer(r *mux.Router, port int, metaFolder string,
r.HandleFunc("/stats/memory", ms.guard.WhiteList(statsMemoryHandler)) r.HandleFunc("/stats/memory", ms.guard.WhiteList(statsMemoryHandler))
r.HandleFunc("/debug/pprof/", ms.guard.WhiteList(pprof.Index)) r.HandleFunc("/debug/pprof/", ms.guard.WhiteList(pprof.Index))
r.HandleFunc("/debug/pprof/trace", ms.guard.WhiteList(pprof.Trace)) r.HandleFunc("/debug/pprof/trace", ms.guard.WhiteList(pprof.Trace))
r.HandleFunc("/debug/pprof/profile", ms.guard.WhiteList(pprof.Profile))
r.HandleFunc("/debug/pprof/cmdline", ms.guard.WhiteList(pprof.Cmdline))
r.HandleFunc("/debug/pprof/symbol", ms.guard.WhiteList(pprof.Symbol))
r.HandleFunc("/debug/pprof/{name}", ms.guard.WhiteList(pprof.Index)) r.HandleFunc("/debug/pprof/{name}", ms.guard.WhiteList(pprof.Index))
ms.Topo.StartRefreshWritableVolumes() ms.Topo.StartRefreshWritableVolumes()
return ms return ms

3
weed/weedserver/volume_server.go

@ -68,6 +68,9 @@ func NewVolumeServer(adminMux, publicMux *http.ServeMux, ip string,
adminMux.HandleFunc("/stats/disk", vs.guard.WhiteList(vs.statsDiskHandler)) adminMux.HandleFunc("/stats/disk", vs.guard.WhiteList(vs.statsDiskHandler))
adminMux.HandleFunc("/debug/pprof/", vs.guard.WhiteList(pprof.Index)) adminMux.HandleFunc("/debug/pprof/", vs.guard.WhiteList(pprof.Index))
adminMux.HandleFunc("/debug/pprof/trace", vs.guard.WhiteList(pprof.Trace)) adminMux.HandleFunc("/debug/pprof/trace", vs.guard.WhiteList(pprof.Trace))
adminMux.HandleFunc("/debug/pprof/profile", vs.guard.WhiteList(pprof.Profile))
adminMux.HandleFunc("/debug/pprof/cmdline", vs.guard.WhiteList(pprof.Cmdline))
adminMux.HandleFunc("/debug/pprof/symbol", vs.guard.WhiteList(pprof.Symbol))
adminMux.HandleFunc("/debug/pprof/{name}", vs.guard.WhiteList(pprof.Index)) adminMux.HandleFunc("/debug/pprof/{name}", vs.guard.WhiteList(pprof.Index))
adminMux.HandleFunc("/delete", vs.guard.WhiteList(vs.batchDeleteHandler)) adminMux.HandleFunc("/delete", vs.guard.WhiteList(vs.batchDeleteHandler))
adminMux.HandleFunc("/", vs.privateStoreHandler) adminMux.HandleFunc("/", vs.privateStoreHandler)

Loading…
Cancel
Save