mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-01-19 02:48:24 +00:00
follow golint suggestions
This commit is contained in:
parent
b4cb8bfd27
commit
b07d81fb08
|
@ -34,7 +34,7 @@ func (dm *DirectoryManagerInMap) NewDirectoryEntryInMap(parent *DirectoryEntryIn
|
||||||
writeLock.Lock()
|
writeLock.Lock()
|
||||||
defer writeLock.Unlock()
|
defer writeLock.Unlock()
|
||||||
d = &DirectoryEntryInMap{Name: name, Parent: parent, SubDirectories: make(map[string]*DirectoryEntryInMap)}
|
d = &DirectoryEntryInMap{Name: name, Parent: parent, SubDirectories: make(map[string]*DirectoryEntryInMap)}
|
||||||
parts := make([]string, 0)
|
var parts []string
|
||||||
for p := d; p != nil && p.Name != ""; p = p.Parent {
|
for p := d; p != nil && p.Name != ""; p = p.Parent {
|
||||||
parts = append(parts, p.Name)
|
parts = append(parts, p.Name)
|
||||||
}
|
}
|
||||||
|
@ -162,7 +162,7 @@ func (dm *DirectoryManagerInMap) loadDirectory(dirPath string, dirId filer.Direc
|
||||||
sub, ok := dir.SubDirectories[parts[i]]
|
sub, ok := dir.SubDirectories[parts[i]]
|
||||||
if !ok {
|
if !ok {
|
||||||
if i != len(parts)-1 {
|
if i != len(parts)-1 {
|
||||||
return fmt.Errorf("%s should be created after parent %s!", dirPath, parts[i])
|
return fmt.Errorf("%s should be created after parent %s", dirPath, parts[i])
|
||||||
}
|
}
|
||||||
var err error
|
var err error
|
||||||
sub, err = dm.NewDirectoryEntryInMap(dir, parts[i])
|
sub, err = dm.NewDirectoryEntryInMap(dir, parts[i])
|
||||||
|
@ -170,7 +170,7 @@ func (dm *DirectoryManagerInMap) loadDirectory(dirPath string, dirId filer.Direc
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
if sub.Id != dirId {
|
if sub.Id != dirId {
|
||||||
return fmt.Errorf("%s should be have id %v instead of %v!", dirPath, sub.Id, dirId)
|
return fmt.Errorf("%s should be have id %v instead of %v", dirPath, sub.Id, dirId)
|
||||||
}
|
}
|
||||||
dir.SubDirectories[parts[i]] = sub
|
dir.SubDirectories[parts[i]] = sub
|
||||||
}
|
}
|
||||||
|
|
|
@ -125,19 +125,17 @@ func (filer *FilerEmbedded) Move(fromPath string, toPath string) error {
|
||||||
if _, err := filer.FindDirectory(toPath); err == nil {
|
if _, err := filer.FindDirectory(toPath); err == nil {
|
||||||
// move folder under an existing folder
|
// move folder under an existing folder
|
||||||
return filer.directories.MoveUnderDirectory(fromPath, toPath, "")
|
return filer.directories.MoveUnderDirectory(fromPath, toPath, "")
|
||||||
} else {
|
|
||||||
// move folder to a new folder
|
|
||||||
return filer.directories.MoveUnderDirectory(fromPath, filepath.Dir(toPath), filepath.Base(toPath))
|
|
||||||
}
|
}
|
||||||
|
// move folder to a new folder
|
||||||
|
return filer.directories.MoveUnderDirectory(fromPath, filepath.Dir(toPath), filepath.Base(toPath))
|
||||||
}
|
}
|
||||||
if fid, file_err := filer.DeleteFile(fromPath); file_err == nil {
|
if fid, file_err := filer.DeleteFile(fromPath); file_err == nil {
|
||||||
if _, err := filer.FindDirectory(toPath); err == nil {
|
if _, err := filer.FindDirectory(toPath); err == nil {
|
||||||
// move file under an existing folder
|
// move file under an existing folder
|
||||||
return filer.CreateFile(filepath.Join(toPath, filepath.Base(fromPath)), fid)
|
return filer.CreateFile(filepath.Join(toPath, filepath.Base(fromPath)), fid)
|
||||||
} else {
|
|
||||||
// move to a folder with new name
|
|
||||||
return filer.CreateFile(toPath, fid)
|
|
||||||
}
|
}
|
||||||
|
// move to a folder with new name
|
||||||
|
return filer.CreateFile(toPath, fid)
|
||||||
}
|
}
|
||||||
return fmt.Errorf("File %s is not found!", fromPath)
|
return fmt.Errorf("File %s is not found!", fromPath)
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,7 +12,7 @@ type FlatNamesapceFiler struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
NotImplemented = errors.New("Not Implemented for flat namespace meta data store!")
|
ErrNotImplemented = errors.New("Not Implemented for flat namespace meta data store")
|
||||||
)
|
)
|
||||||
|
|
||||||
func NewFlatNamesapceFiler(master string, store FlatNamespaceStore) *FlatNamesapceFiler {
|
func NewFlatNamesapceFiler(master string, store FlatNamespaceStore) *FlatNamesapceFiler {
|
||||||
|
@ -29,16 +29,16 @@ func (filer *FlatNamesapceFiler) FindFile(fullFileName string) (fid string, err
|
||||||
return filer.store.Get(fullFileName)
|
return filer.store.Get(fullFileName)
|
||||||
}
|
}
|
||||||
func (filer *FlatNamesapceFiler) FindDirectory(dirPath string) (dirId filer.DirectoryId, err error) {
|
func (filer *FlatNamesapceFiler) FindDirectory(dirPath string) (dirId filer.DirectoryId, err error) {
|
||||||
return 0, NotImplemented
|
return 0, ErrNotImplemented
|
||||||
}
|
}
|
||||||
func (filer *FlatNamesapceFiler) ListDirectories(dirPath string) (dirs []filer.DirectoryEntry, err error) {
|
func (filer *FlatNamesapceFiler) ListDirectories(dirPath string) (dirs []filer.DirectoryEntry, err error) {
|
||||||
return nil, NotImplemented
|
return nil, ErrNotImplemented
|
||||||
}
|
}
|
||||||
func (filer *FlatNamesapceFiler) ListFiles(dirPath string, lastFileName string, limit int) (files []filer.FileEntry, err error) {
|
func (filer *FlatNamesapceFiler) ListFiles(dirPath string, lastFileName string, limit int) (files []filer.FileEntry, err error) {
|
||||||
return nil, NotImplemented
|
return nil, ErrNotImplemented
|
||||||
}
|
}
|
||||||
func (filer *FlatNamesapceFiler) DeleteDirectory(dirPath string, recursive bool) (err error) {
|
func (filer *FlatNamesapceFiler) DeleteDirectory(dirPath string, recursive bool) (err error) {
|
||||||
return NotImplemented
|
return ErrNotImplemented
|
||||||
}
|
}
|
||||||
|
|
||||||
func (filer *FlatNamesapceFiler) DeleteFile(fullFileName string) (fid string, err error) {
|
func (filer *FlatNamesapceFiler) DeleteFile(fullFileName string) (fid string, err error) {
|
||||||
|
@ -46,5 +46,5 @@ func (filer *FlatNamesapceFiler) DeleteFile(fullFileName string) (fid string, er
|
||||||
}
|
}
|
||||||
|
|
||||||
func (filer *FlatNamesapceFiler) Move(fromPath string, toPath string) error {
|
func (filer *FlatNamesapceFiler) Move(fromPath string, toPath string) error {
|
||||||
return NotImplemented
|
return ErrNotImplemented
|
||||||
}
|
}
|
||||||
|
|
|
@ -41,8 +41,8 @@ func (s *RedisStore) Delete(fullFileName string) (fid string, err error) {
|
||||||
return "", err
|
return "", err
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *RedisStore) Close() {
|
func (s *RedisStore) Close() {
|
||||||
if c.Client != nil {
|
if s.Client != nil {
|
||||||
c.Client.Close()
|
s.Client.Close()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -117,7 +117,7 @@ func (fi FilePart) Upload(maxMB int, master string, secret security.Secret) (ret
|
||||||
if maxMB > 0 && fi.FileSize > int64(maxMB*1024*1024) {
|
if maxMB > 0 && fi.FileSize > int64(maxMB*1024*1024) {
|
||||||
chunkSize := int64(maxMB * 1024 * 1024)
|
chunkSize := int64(maxMB * 1024 * 1024)
|
||||||
chunks := fi.FileSize/chunkSize + 1
|
chunks := fi.FileSize/chunkSize + 1
|
||||||
fids := make([]string, 0)
|
var fids []string
|
||||||
for i := int64(0); i < chunks; i++ {
|
for i := int64(0); i < chunks; i++ {
|
||||||
id, count, e := upload_one_chunk(
|
id, count, e := upload_one_chunk(
|
||||||
fi.FileName+"-"+strconv.FormatInt(i+1, 10),
|
fi.FileName+"-"+strconv.FormatInt(i+1, 10),
|
||||||
|
|
|
@ -96,7 +96,7 @@ func getMetric(c *cdb.Cdb, m *mapMetric) error {
|
||||||
func (m cdbMap) Get(key uint64) (element *NeedleValue, ok bool) {
|
func (m cdbMap) Get(key uint64) (element *NeedleValue, ok bool) {
|
||||||
var (
|
var (
|
||||||
data []byte
|
data []byte
|
||||||
k []byte = make([]byte, 8)
|
k = make([]byte, 8)
|
||||||
err error
|
err error
|
||||||
)
|
)
|
||||||
util.Uint64toBytes(k, key)
|
util.Uint64toBytes(k, key)
|
||||||
|
|
|
@ -151,9 +151,8 @@ func (cm *CompactMap) binarySearchCompactSection(key Key) int {
|
||||||
if cm.list[h].start <= key {
|
if cm.list[h].start <= key {
|
||||||
if cm.list[h].counter < batch || key <= cm.list[h].end {
|
if cm.list[h].counter < batch || key <= cm.list[h].end {
|
||||||
return h
|
return h
|
||||||
} else {
|
|
||||||
return -4
|
|
||||||
}
|
}
|
||||||
|
return -4
|
||||||
}
|
}
|
||||||
for l <= h {
|
for l <= h {
|
||||||
m := (l + h) / 2
|
m := (l + h) / 2
|
||||||
|
|
|
@ -147,7 +147,7 @@ func (n *Needle) Read(r *os.File, offset int64, size uint32, version Version) (r
|
||||||
checksum := util.BytesToUint32(bytes[NeedleHeaderSize+size : NeedleHeaderSize+size+NeedleChecksumSize])
|
checksum := util.BytesToUint32(bytes[NeedleHeaderSize+size : NeedleHeaderSize+size+NeedleChecksumSize])
|
||||||
newChecksum := NewCRC(n.Data)
|
newChecksum := NewCRC(n.Data)
|
||||||
if checksum != newChecksum.Value() {
|
if checksum != newChecksum.Value() {
|
||||||
return 0, errors.New("CRC error! Data On Disk Corrupted!")
|
return 0, errors.New("CRC error! Data On Disk Corrupted")
|
||||||
}
|
}
|
||||||
n.Checksum = newChecksum
|
n.Checksum = newChecksum
|
||||||
return
|
return
|
||||||
|
@ -160,17 +160,17 @@ func (n *Needle) Read(r *os.File, offset int64, size uint32, version Version) (r
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if ret != int(NeedleHeaderSize+size+NeedleChecksumSize) {
|
if ret != int(NeedleHeaderSize+size+NeedleChecksumSize) {
|
||||||
return 0, errors.New("File Entry Not Found!")
|
return 0, errors.New("File Entry Not Found")
|
||||||
}
|
}
|
||||||
n.readNeedleHeader(bytes)
|
n.readNeedleHeader(bytes)
|
||||||
if n.Size != size {
|
if n.Size != size {
|
||||||
return 0, fmt.Errorf("File Entry Not Found! Needle %d Memory %d", n.Size, size)
|
return 0, fmt.Errorf("File Entry Not Found. Needle %d Memory %d", n.Size, size)
|
||||||
}
|
}
|
||||||
n.readNeedleDataVersion2(bytes[NeedleHeaderSize : NeedleHeaderSize+int(n.Size)])
|
n.readNeedleDataVersion2(bytes[NeedleHeaderSize : NeedleHeaderSize+int(n.Size)])
|
||||||
checksum := util.BytesToUint32(bytes[NeedleHeaderSize+n.Size : NeedleHeaderSize+n.Size+NeedleChecksumSize])
|
checksum := util.BytesToUint32(bytes[NeedleHeaderSize+n.Size : NeedleHeaderSize+n.Size+NeedleChecksumSize])
|
||||||
newChecksum := NewCRC(n.Data)
|
newChecksum := NewCRC(n.Data)
|
||||||
if checksum != newChecksum.Value() {
|
if checksum != newChecksum.Value() {
|
||||||
return 0, errors.New("CRC error! Data On Disk Corrupted!")
|
return 0, errors.New("CRC Found Data On Disk Corrupted")
|
||||||
}
|
}
|
||||||
n.Checksum = newChecksum
|
n.Checksum = newChecksum
|
||||||
return
|
return
|
||||||
|
|
|
@ -198,7 +198,7 @@ func (s *Store) addVolume(vid VolumeId, collection string, replicaPlacement *Rep
|
||||||
func (s *Store) FreezeVolume(volumeIdString string) error {
|
func (s *Store) FreezeVolume(volumeIdString string) error {
|
||||||
vid, err := NewVolumeId(volumeIdString)
|
vid, err := NewVolumeId(volumeIdString)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return fmt.Errorf("Volume Id %s is not a valid unsigned integer!", volumeIdString)
|
return fmt.Errorf("Volume Id %s is not a valid unsigned integer", volumeIdString)
|
||||||
}
|
}
|
||||||
if v := s.findVolume(vid); v != nil {
|
if v := s.findVolume(vid); v != nil {
|
||||||
if v.readOnly {
|
if v.readOnly {
|
||||||
|
@ -206,7 +206,7 @@ func (s *Store) FreezeVolume(volumeIdString string) error {
|
||||||
}
|
}
|
||||||
return v.freeze()
|
return v.freeze()
|
||||||
}
|
}
|
||||||
return fmt.Errorf("volume id %d is not found during freeze!", vid)
|
return fmt.Errorf("volume id %d is not found during freeze", vid)
|
||||||
}
|
}
|
||||||
func (l *DiskLocation) loadExistingVolumes() {
|
func (l *DiskLocation) loadExistingVolumes() {
|
||||||
if dirs, err := ioutil.ReadDir(l.Directory); err == nil {
|
if dirs, err := ioutil.ReadDir(l.Directory); err == nil {
|
||||||
|
@ -343,19 +343,18 @@ func (s *Store) Close() {
|
||||||
func (s *Store) Write(i VolumeId, n *Needle) (size uint32, err error) {
|
func (s *Store) Write(i VolumeId, n *Needle) (size uint32, err error) {
|
||||||
if v := s.findVolume(i); v != nil {
|
if v := s.findVolume(i); v != nil {
|
||||||
if v.readOnly {
|
if v.readOnly {
|
||||||
err = fmt.Errorf("Volume %d is read only!", i)
|
err = fmt.Errorf("Volume %d is read only", i)
|
||||||
return
|
return
|
||||||
|
}
|
||||||
|
if MaxPossibleVolumeSize >= v.ContentSize()+uint64(size) {
|
||||||
|
size, err = v.write(n)
|
||||||
} else {
|
} else {
|
||||||
if MaxPossibleVolumeSize >= v.ContentSize()+uint64(size) {
|
err = fmt.Errorf("Volume Size Limit %d Exceeded! Current size is %d", s.volumeSizeLimit, v.ContentSize())
|
||||||
size, err = v.write(n)
|
}
|
||||||
} else {
|
if s.volumeSizeLimit < v.ContentSize()+3*uint64(size) {
|
||||||
err = fmt.Errorf("Volume Size Limit %d Exceeded! Current size is %d", s.volumeSizeLimit, v.ContentSize())
|
glog.V(0).Infoln("volume", i, "size", v.ContentSize(), "will exceed limit", s.volumeSizeLimit)
|
||||||
}
|
if _, _, e := s.Join(); e != nil {
|
||||||
if s.volumeSizeLimit < v.ContentSize()+3*uint64(size) {
|
glog.V(0).Infoln("error when reporting size:", e)
|
||||||
glog.V(0).Infoln("volume", i, "size", v.ContentSize(), "will exceed limit", s.volumeSizeLimit)
|
|
||||||
if _, _, e := s.Join(); e != nil {
|
|
||||||
glog.V(0).Infoln("error when reporting size:", e)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return
|
return
|
||||||
|
|
|
@ -10,35 +10,35 @@ import (
|
||||||
func (s *Store) CheckCompactVolume(volumeIdString string, garbageThresholdString string) (error, bool) {
|
func (s *Store) CheckCompactVolume(volumeIdString string, garbageThresholdString string) (error, bool) {
|
||||||
vid, err := NewVolumeId(volumeIdString)
|
vid, err := NewVolumeId(volumeIdString)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return fmt.Errorf("Volume Id %s is not a valid unsigned integer!", volumeIdString), false
|
return fmt.Errorf("Volume Id %s is not a valid unsigned integer", volumeIdString), false
|
||||||
}
|
}
|
||||||
garbageThreshold, e := strconv.ParseFloat(garbageThresholdString, 32)
|
garbageThreshold, e := strconv.ParseFloat(garbageThresholdString, 32)
|
||||||
if e != nil {
|
if e != nil {
|
||||||
return fmt.Errorf("garbageThreshold %s is not a valid float number!", garbageThresholdString), false
|
return fmt.Errorf("garbageThreshold %s is not a valid float number", garbageThresholdString), false
|
||||||
}
|
}
|
||||||
if v := s.findVolume(vid); v != nil {
|
if v := s.findVolume(vid); v != nil {
|
||||||
glog.V(3).Infoln(vid, "garbage level is", v.garbageLevel())
|
glog.V(3).Infoln(vid, "garbage level is", v.garbageLevel())
|
||||||
return nil, garbageThreshold < v.garbageLevel()
|
return nil, garbageThreshold < v.garbageLevel()
|
||||||
}
|
}
|
||||||
return fmt.Errorf("volume id %d is not found during check compact!", vid), false
|
return fmt.Errorf("volume id %d is not found during check compact", vid), false
|
||||||
}
|
}
|
||||||
func (s *Store) CompactVolume(volumeIdString string) error {
|
func (s *Store) CompactVolume(volumeIdString string) error {
|
||||||
vid, err := NewVolumeId(volumeIdString)
|
vid, err := NewVolumeId(volumeIdString)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return fmt.Errorf("Volume Id %s is not a valid unsigned integer!", volumeIdString)
|
return fmt.Errorf("Volume Id %s is not a valid unsigned integer", volumeIdString)
|
||||||
}
|
}
|
||||||
if v := s.findVolume(vid); v != nil {
|
if v := s.findVolume(vid); v != nil {
|
||||||
return v.Compact()
|
return v.Compact()
|
||||||
}
|
}
|
||||||
return fmt.Errorf("volume id %d is not found during compact!", vid)
|
return fmt.Errorf("volume id %d is not found during compact", vid)
|
||||||
}
|
}
|
||||||
func (s *Store) CommitCompactVolume(volumeIdString string) error {
|
func (s *Store) CommitCompactVolume(volumeIdString string) error {
|
||||||
vid, err := NewVolumeId(volumeIdString)
|
vid, err := NewVolumeId(volumeIdString)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return fmt.Errorf("Volume Id %s is not a valid unsigned integer!", volumeIdString)
|
return fmt.Errorf("Volume Id %s is not a valid unsigned integer", volumeIdString)
|
||||||
}
|
}
|
||||||
if v := s.findVolume(vid); v != nil {
|
if v := s.findVolume(vid); v != nil {
|
||||||
return v.commitCompact()
|
return v.commitCompact()
|
||||||
}
|
}
|
||||||
return fmt.Errorf("volume id %d is not found during commit compact!", vid)
|
return fmt.Errorf("volume id %d is not found during commit compact", vid)
|
||||||
}
|
}
|
||||||
|
|
|
@ -54,7 +54,7 @@ type NodeImpl struct {
|
||||||
// the first node must satisfy filterFirstNodeFn(), the rest nodes must have one free slot
|
// the first node must satisfy filterFirstNodeFn(), the rest nodes must have one free slot
|
||||||
func (n *NodeImpl) RandomlyPickNodes(numberOfNodes int, filterFirstNodeFn func(dn Node) error) (firstNode Node, restNodes []Node, err error) {
|
func (n *NodeImpl) RandomlyPickNodes(numberOfNodes int, filterFirstNodeFn func(dn Node) error) (firstNode Node, restNodes []Node, err error) {
|
||||||
candidates := make([]Node, 0, len(n.children))
|
candidates := make([]Node, 0, len(n.children))
|
||||||
errs := make([]string, 0)
|
var errs []string
|
||||||
for _, node := range n.children {
|
for _, node := range n.children {
|
||||||
if err := filterFirstNodeFn(node); err == nil {
|
if err := filterFirstNodeFn(node); err == nil {
|
||||||
candidates = append(candidates, node)
|
candidates = append(candidates, node)
|
||||||
|
|
|
@ -50,13 +50,13 @@ func (r *Rack) GetOrCreateDataNode(ip string, port int, publicUrl string, maxVol
|
||||||
return dn
|
return dn
|
||||||
}
|
}
|
||||||
|
|
||||||
func (rack *Rack) ToMap() interface{} {
|
func (r *Rack) ToMap() interface{} {
|
||||||
m := make(map[string]interface{})
|
m := make(map[string]interface{})
|
||||||
m["Id"] = rack.Id()
|
m["Id"] = r.Id()
|
||||||
m["Max"] = rack.GetMaxVolumeCount()
|
m["Max"] = r.GetMaxVolumeCount()
|
||||||
m["Free"] = rack.FreeSpace()
|
m["Free"] = r.FreeSpace()
|
||||||
var dns []interface{}
|
var dns []interface{}
|
||||||
for _, c := range rack.Children() {
|
for _, c := range r.Children() {
|
||||||
dn := c.(*DataNode)
|
dn := c.(*DataNode)
|
||||||
dns = append(dns, dn.ToMap())
|
dns = append(dns, dn.ToMap())
|
||||||
}
|
}
|
||||||
|
|
|
@ -82,9 +82,8 @@ func (t *Topology) loadConfiguration(configurationFile string) error {
|
||||||
if e == nil {
|
if e == nil {
|
||||||
t.configuration, e = NewConfiguration(b)
|
t.configuration, e = NewConfiguration(b)
|
||||||
return e
|
return e
|
||||||
} else {
|
|
||||||
glog.V(0).Infoln("Using default configurations.")
|
|
||||||
}
|
}
|
||||||
|
glog.V(0).Infoln("Using default configurations.")
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -100,29 +100,28 @@ func (vl *VolumeLayout) PickForWrite(count int, option *VolumeGrowOption) (*stor
|
||||||
return &vid, count, locationList, nil
|
return &vid, count, locationList, nil
|
||||||
}
|
}
|
||||||
return nil, 0, nil, errors.New("Strangely vid " + vid.String() + " is on no machine!")
|
return nil, 0, nil, errors.New("Strangely vid " + vid.String() + " is on no machine!")
|
||||||
} else {
|
}
|
||||||
var vid storage.VolumeId
|
var vid storage.VolumeId
|
||||||
var locationList *VolumeLocationList
|
var locationList *VolumeLocationList
|
||||||
counter := 0
|
counter := 0
|
||||||
for _, v := range vl.writables {
|
for _, v := range vl.writables {
|
||||||
volumeLocationList := vl.vid2location[v]
|
volumeLocationList := vl.vid2location[v]
|
||||||
for _, dn := range volumeLocationList.list {
|
for _, dn := range volumeLocationList.list {
|
||||||
if dn.GetDataCenter().Id() == NodeId(option.DataCenter) {
|
if dn.GetDataCenter().Id() == NodeId(option.DataCenter) {
|
||||||
if option.Rack != "" && dn.GetRack().Id() != NodeId(option.Rack) {
|
if option.Rack != "" && dn.GetRack().Id() != NodeId(option.Rack) {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
if option.DataNode != "" && dn.Id() != NodeId(option.DataNode) {
|
if option.DataNode != "" && dn.Id() != NodeId(option.DataNode) {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
counter++
|
counter++
|
||||||
if rand.Intn(counter) < 1 {
|
if rand.Intn(counter) < 1 {
|
||||||
vid, locationList = v, volumeLocationList
|
vid, locationList = v, volumeLocationList
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return &vid, count, locationList, nil
|
|
||||||
}
|
}
|
||||||
|
return &vid, count, locationList, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (vl *VolumeLayout) GetActiveVolumeCount(option *VolumeGrowOption) int {
|
func (vl *VolumeLayout) GetActiveVolumeCount(option *VolumeGrowOption) int {
|
||||||
|
|
|
@ -32,8 +32,7 @@ func (m *ConcurrentReadMap) Get(key string, newEntry func() interface{}) interfa
|
||||||
if value, ok := m.Items[key]; ok {
|
if value, ok := m.Items[key]; ok {
|
||||||
m.rmutex.RUnlock()
|
m.rmutex.RUnlock()
|
||||||
return value
|
return value
|
||||||
} else {
|
|
||||||
m.rmutex.RUnlock()
|
|
||||||
return m.initMapEntry(key, newEntry)
|
|
||||||
}
|
}
|
||||||
|
m.rmutex.RUnlock()
|
||||||
|
return m.initMapEntry(key, newEntry)
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
package util
|
||||||
|
|
||||||
// Copyright 2011 Numerotron Inc.
|
// Copyright 2011 Numerotron Inc.
|
||||||
// Use of this source code is governed by an MIT-style license
|
// Use of this source code is governed by an MIT-style license
|
||||||
// that can be found in the LICENSE file.
|
// that can be found in the LICENSE file.
|
||||||
|
@ -6,7 +8,6 @@
|
||||||
// Contact us on twitter with any questions: twitter.com/stat_hat
|
// Contact us on twitter with any questions: twitter.com/stat_hat
|
||||||
|
|
||||||
// The jconfig package provides a simple, basic configuration file parser using JSON.
|
// The jconfig package provides a simple, basic configuration file parser using JSON.
|
||||||
package util
|
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
|
|
|
@ -26,8 +26,8 @@ func TestFolderWritable(folder string) (err error) {
|
||||||
|
|
||||||
func Readln(r *bufio.Reader) ([]byte, error) {
|
func Readln(r *bufio.Reader) ([]byte, error) {
|
||||||
var (
|
var (
|
||||||
isPrefix bool = true
|
isPrefix = true
|
||||||
err error = nil
|
err error
|
||||||
line, ln []byte
|
line, ln []byte
|
||||||
)
|
)
|
||||||
for isPrefix && err == nil {
|
for isPrefix && err == nil {
|
||||||
|
|
|
@ -534,8 +534,8 @@ func (l *FakeReader) WriteTo(w io.Writer) (n int64, err error) {
|
||||||
|
|
||||||
func Readln(r *bufio.Reader) ([]byte, error) {
|
func Readln(r *bufio.Reader) ([]byte, error) {
|
||||||
var (
|
var (
|
||||||
isPrefix bool = true
|
isPrefix = true
|
||||||
err error = nil
|
err error
|
||||||
line, ln []byte
|
line, ln []byte
|
||||||
)
|
)
|
||||||
for isPrefix && err == nil {
|
for isPrefix && err == nil {
|
||||||
|
|
477
go/weed/cover.out
Normal file
477
go/weed/cover.out
Normal file
|
@ -0,0 +1,477 @@
|
||||||
|
mode: set
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/weed.go:41.27,43.20 2 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/weed.go:46.2,46.17 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/weed.go:43.20,45.3 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/weed.go:49.13,56.19 6 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/weed.go:60.2,60.23 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/weed.go:71.2,71.31 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/weed.go:88.2,90.8 3 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/weed.go:56.19,58.3 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/weed.go:60.23,62.32 2 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/weed.go:68.3,68.9 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/weed.go:62.32,63.65 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/weed.go:63.65,66.5 2 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/weed.go:71.31,72.46 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/weed.go:72.46,73.28 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/weed.go:74.4,77.27 4 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/weed.go:83.4,84.10 2 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/weed.go:73.28,73.43 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/weed.go:77.27,82.5 4 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/weed.go:114.55,118.43 4 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/weed.go:118.43,120.3 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/weed.go:123.34,124.13 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/weed.go:127.2,128.43 2 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/weed.go:124.13,126.3 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/weed.go:131.30,133.2 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/weed.go:135.14,140.2 4 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/weed.go:143.26,144.20 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/weed.go:149.2,149.20 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/weed.go:154.2,156.31 2 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/weed.go:164.2,165.12 2 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/weed.go:144.20,148.3 2 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/weed.go:149.20,152.3 2 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/weed.go:156.31,157.24 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/weed.go:157.24,161.4 2 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/weed.go:170.23,172.2 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/weed.go:174.13,175.32 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/weed.go:178.2,178.21 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/weed.go:175.32,177.3 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/weed.go:181.35,183.2 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/master.go:17.13,19.2 1 1
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/master.go:50.50,51.18 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/master.go:54.2,55.61 2 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/master.go:58.2,58.34 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/master.go:62.2,73.14 6 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/master.go:77.2,77.12 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/master.go:91.2,91.44 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/master.go:94.2,94.13 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/master.go:51.18,53.3 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/master.go:55.61,57.3 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/master.go:58.34,60.3 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/master.go:73.14,75.3 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/master.go:77.12,80.24 3 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/master.go:83.3,84.25 2 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/master.go:87.3,88.31 2 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/master.go:80.24,82.4 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/master.go:84.25,86.4 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/master.go:91.44,93.3 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/shell.go:11.13,13.2 1 1
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/shell.go:25.53,29.19 4 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/shell.go:38.2,38.28 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/shell.go:46.2,46.34 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/shell.go:55.2,56.6 2 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/shell.go:29.19,31.47 2 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/shell.go:34.3,34.34 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/shell.go:31.47,33.4 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/shell.go:34.34,36.4 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/shell.go:38.28,40.17 2 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/shell.go:44.3,44.13 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/shell.go:40.17,43.4 2 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/shell.go:46.34,47.16 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/shell.go:52.3,52.11 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/shell.go:47.16,48.48 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/shell.go:48.48,50.5 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/shell.go:56.6,60.3 3 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/upload.go:23.13,34.2 10 1
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/upload.go:59.50,61.37 2 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/upload.go:102.2,102.13 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/upload.go:61.37,62.23 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/upload.go:65.3,65.82 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/upload.go:62.23,64.4 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/upload.go:65.82,66.18 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/upload.go:89.4,89.14 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/upload.go:66.18,67.22 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/upload.go:67.22,68.24 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/upload.go:73.6,74.18 2 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/upload.go:77.6,82.18 4 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/upload.go:68.24,69.70 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/upload.go:69.70,71.8 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/upload.go:74.18,76.7 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/upload.go:82.18,84.7 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/upload.go:86.5,88.5 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/upload.go:91.3,93.15 2 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/upload.go:96.3,100.29 3 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/upload.go:93.15,95.4 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/signal_handling.go:11.29,22.12 3 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/signal_handling.go:22.12,23.28 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/signal_handling.go:23.28,26.4 2 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/volume.go:38.13,52.2 13 1
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/volume.go:68.50,69.19 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/volume.go:72.2,77.44 4 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/volume.go:84.2,84.46 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/volume.go:87.2,87.35 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/volume.go:94.2,94.34 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/volume.go:98.2,98.17 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/volume.go:101.2,101.24 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/volume.go:105.2,105.24 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/volume.go:108.2,112.27 4 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/volume.go:116.2,127.14 5 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/volume.go:130.2,130.27 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/volume.go:144.2,144.21 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/volume.go:148.2,148.52 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/volume.go:151.2,151.13 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/volume.go:69.19,71.3 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/volume.go:77.44,78.50 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/volume.go:78.50,80.4 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/volume.go:80.4,82.4 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/volume.go:84.46,86.3 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/volume.go:87.35,88.57 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/volume.go:88.57,90.4 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/volume.go:94.34,96.3 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/volume.go:98.17,100.3 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/volume.go:101.24,103.3 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/volume.go:105.24,107.3 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/volume.go:112.27,114.3 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/volume.go:127.14,129.3 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/volume.go:130.27,134.15 4 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/volume.go:137.3,137.13 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/volume.go:134.15,136.4 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/volume.go:137.13,138.66 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/volume.go:138.66,140.5 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/volume.go:144.21,146.3 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/volume.go:148.52,150.3 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/download.go:20.13,25.2 4 1
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/download.go:41.52,42.27 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/download.go:78.2,78.13 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/download.go:42.27,44.15 2 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/download.go:48.3,48.21 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/download.go:51.3,51.43 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/download.go:44.15,46.12 2 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/download.go:48.21,50.4 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/download.go:51.43,55.18 4 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/download.go:59.4,60.32 2 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/download.go:55.18,57.13 2 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/download.go:60.32,63.19 3 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/download.go:66.5,66.36 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/download.go:69.5,69.19 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/download.go:63.19,65.6 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/download.go:66.36,68.6 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/download.go:69.19,71.11 2 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/download.go:74.4,76.4 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/download.go:81.91,83.24 2 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/download.go:86.2,87.8 2 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/download.go:83.24,85.3 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/download.go:90.70,92.16 2 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/download.go:95.2,97.33 3 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/download.go:100.2,100.12 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/download.go:92.16,94.3 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/download.go:97.33,99.3 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/fix.go:12.13,14.2 1 1
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/fix.go:30.47,32.24 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/fix.go:36.2,37.32 2 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/fix.go:40.2,41.16 2 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/fix.go:44.2,50.116 5 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/fix.go:63.2,63.16 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/fix.go:67.2,67.13 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/fix.go:32.24,34.3 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/fix.go:37.32,39.3 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/fix.go:41.16,43.3 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/fix.go:50.116,52.3 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/fix.go:52.56,54.17 2 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/fix.go:61.3,61.13 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/fix.go:54.17,57.4 2 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/fix.go:57.4,60.4 2 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/fix.go:63.16,65.3 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/server.go:28.13,30.2 1 1
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/server.go:77.13,89.2 11 1
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/server.go:91.50,93.37 2 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/server.go:102.2,102.34 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/server.go:106.2,108.49 2 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/server.go:112.2,112.28 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/server.go:116.2,116.23 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/server.go:119.2,124.44 5 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/server.go:131.2,131.36 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/server.go:134.2,134.33 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/server.go:140.2,140.29 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/server.go:143.2,143.22 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/server.go:152.2,152.67 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/server.go:156.2,156.34 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/server.go:160.2,160.22 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/server.go:186.2,192.12 5 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/server.go:224.2,226.28 3 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/server.go:229.2,232.27 4 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/server.go:235.2,247.20 4 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/server.go:250.2,250.27 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/server.go:264.2,264.21 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/server.go:269.2,269.58 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/server.go:273.2,273.13 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/server.go:93.37,95.17 2 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/server.go:98.3,99.31 2 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/server.go:95.17,97.4 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/server.go:102.34,104.3 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/server.go:108.49,110.3 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/server.go:112.28,114.3 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/server.go:116.23,118.3 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/server.go:124.44,125.50 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/server.go:125.50,127.4 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/server.go:127.4,129.4 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/server.go:131.36,133.3 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/server.go:134.33,135.57 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/server.go:135.57,137.4 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/server.go:140.29,142.3 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/server.go:143.22,144.30 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/server.go:148.3,148.68 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/server.go:144.30,147.4 2 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/server.go:148.68,150.4 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/server.go:152.67,154.3 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/server.go:156.34,158.3 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/server.go:160.22,161.13 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/server.go:161.13,169.22 3 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/server.go:172.4,177.16 3 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/server.go:180.4,180.51 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/server.go:169.22,171.5 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/server.go:177.16,179.5 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/server.go:180.51,182.5 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/server.go:192.12,201.15 5 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/server.go:205.3,205.13 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/server.go:218.3,219.51 2 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/server.go:201.15,203.4 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/server.go:205.13,210.26 5 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/server.go:213.4,215.21 3 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/server.go:210.26,212.5 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/server.go:219.51,221.4 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/server.go:226.28,228.3 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/server.go:232.27,234.3 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/server.go:247.20,249.3 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/server.go:250.27,254.15 4 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/server.go:257.3,257.13 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/server.go:254.15,256.4 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/server.go:257.13,258.66 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/server.go:258.66,260.5 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/server.go:264.21,267.3 2 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/server.go:269.58,271.3 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/filer.go:32.13,46.2 12 1
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/filer.go:70.49,72.56 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/filer.go:76.2,83.20 3 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/filer.go:86.2,91.14 3 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/filer.go:94.2,94.49 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/filer.go:98.2,98.13 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/filer.go:72.56,74.3 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/filer.go:83.20,85.3 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/filer.go:91.14,93.3 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/filer.go:94.49,96.3 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/benchmark.go:46.13,64.2 17 1
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/benchmark.go:104.53,106.19 2 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/benchmark.go:109.2,110.25 2 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/benchmark.go:119.2,119.14 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/benchmark.go:123.2,123.13 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/benchmark.go:127.2,127.13 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/benchmark.go:106.19,108.3 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/benchmark.go:110.25,112.17 2 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/benchmark.go:115.3,116.31 2 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/benchmark.go:112.17,114.4 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/benchmark.go:119.14,121.3 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/benchmark.go:123.13,125.3 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/benchmark.go:130.20,136.38 6 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/benchmark.go:140.2,143.40 4 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/benchmark.go:146.2,154.25 9 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/benchmark.go:136.38,139.3 2 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/benchmark.go:143.40,145.3 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/benchmark.go:157.19,165.38 8 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/benchmark.go:169.2,175.24 7 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/benchmark.go:165.38,168.3 2 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/benchmark.go:183.71,189.25 5 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/benchmark.go:207.2,207.25 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/benchmark.go:235.2,236.25 2 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/benchmark.go:189.25,191.13 2 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/benchmark.go:191.13,193.38 2 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/benchmark.go:193.38,194.39 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/benchmark.go:197.5,198.52 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/benchmark.go:194.39,196.6 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/benchmark.go:198.52,200.6 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/benchmark.go:200.6,202.6 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/benchmark.go:207.25,211.93 4 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/benchmark.go:211.93,213.61 2 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/benchmark.go:226.4,227.29 2 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/benchmark.go:213.61,214.45 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/benchmark.go:220.5,221.30 2 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/benchmark.go:214.45,217.6 2 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/benchmark.go:217.6,219.6 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/benchmark.go:222.5,225.5 2 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/benchmark.go:227.29,229.5 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/benchmark.go:230.4,233.4 2 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/benchmark.go:239.53,242.34 3 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/benchmark.go:242.34,243.20 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/benchmark.go:246.3,246.20 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/benchmark.go:249.3,249.28 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/benchmark.go:252.3,255.43 4 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/benchmark.go:267.3,267.42 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/benchmark.go:243.20,244.12 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/benchmark.go:246.20,247.12 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/benchmark.go:249.28,251.4 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/benchmark.go:255.43,257.47 2 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/benchmark.go:265.4,265.21 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/benchmark.go:257.47,258.65 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/benchmark.go:258.65,259.32 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/benchmark.go:259.32,262.7 2 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/benchmark.go:267.42,269.51 2 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/benchmark.go:269.51,273.5 3 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/benchmark.go:273.5,276.5 2 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/benchmark.go:277.4,280.4 2 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/benchmark.go:284.86,286.16 2 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/benchmark.go:289.2,291.6 2 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/benchmark.go:286.16,288.3 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/benchmark.go:291.6,292.10 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/benchmark.go:293.3,295.10 2 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/benchmark.go:296.3,298.28 2 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/benchmark.go:303.63,305.16 2 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/benchmark.go:308.2,311.23 3 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/benchmark.go:335.2,335.23 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/benchmark.go:305.16,307.3 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/benchmark.go:311.23,312.7 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/benchmark.go:312.7,313.42 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/benchmark.go:313.42,315.5 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/benchmark.go:315.5,316.10 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/benchmark.go:319.3,321.7 2 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/benchmark.go:328.3,328.21 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/benchmark.go:321.7,322.42 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/benchmark.go:322.42,324.5 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/benchmark.go:324.5,325.10 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/benchmark.go:328.21,329.41 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/benchmark.go:329.41,331.5 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/benchmark.go:361.29,367.2 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/benchmark.go:369.44,371.15 2 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/benchmark.go:371.15,373.3 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/benchmark.go:373.3,373.32 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/benchmark.go:373.32,375.3 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/benchmark.go:375.3,377.3 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/benchmark.go:380.70,384.6 4 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/benchmark.go:384.6,385.10 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/benchmark.go:386.3,388.10 2 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/benchmark.go:389.3,391.43 2 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/benchmark.go:396.4,401.72 2 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/benchmark.go:391.43,395.5 3 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/benchmark.go:406.30,408.41 2 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/benchmark.go:414.2,424.35 11 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/benchmark.go:436.2,437.39 2 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/benchmark.go:446.2,448.35 3 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/benchmark.go:454.2,454.39 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/benchmark.go:458.2,465.40 7 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/benchmark.go:468.2,471.35 4 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/benchmark.go:481.2,482.39 2 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/benchmark.go:408.41,413.3 4 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/benchmark.go:424.35,427.20 3 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/benchmark.go:427.20,428.15 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/benchmark.go:431.4,431.15 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/benchmark.go:428.15,430.5 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/benchmark.go:431.15,433.5 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/benchmark.go:437.39,439.26 2 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/benchmark.go:442.3,442.26 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/benchmark.go:439.26,441.4 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/benchmark.go:442.26,444.4 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/benchmark.go:448.35,449.20 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/benchmark.go:449.20,452.4 2 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/benchmark.go:454.39,457.3 2 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/benchmark.go:465.40,467.3 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/benchmark.go:471.35,473.104 2 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/benchmark.go:473.104,476.89 3 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/benchmark.go:476.89,478.5 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/benchmark.go:482.39,484.87 2 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/benchmark.go:484.87,487.89 3 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/benchmark.go:487.89,489.5 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/benchmark.go:500.56,501.17 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/benchmark.go:504.2,504.28 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/benchmark.go:509.2,509.12 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/benchmark.go:514.2,515.8 2 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/benchmark.go:501.17,503.3 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/benchmark.go:504.28,506.3 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/benchmark.go:506.3,508.3 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/benchmark.go:509.12,510.26 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/benchmark.go:510.26,512.4 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/benchmark.go:518.64,521.15 3 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/benchmark.go:532.2,532.20 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/benchmark.go:521.15,523.24 2 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/benchmark.go:526.3,527.15 2 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/benchmark.go:530.3,530.16 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/benchmark.go:523.24,525.4 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/benchmark.go:527.15,529.4 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/benchmark.go:535.46,541.29 2 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/benchmark.go:545.2,545.16 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/benchmark.go:541.29,544.3 2 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/command.go:32.33,35.12 3 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/command.go:38.2,38.13 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/command.go:35.12,37.3 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/command.go:41.27,48.2 6 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/command.go:52.35,54.2 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/export.go:18.13,20.2 1 1
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/export.go:48.50,50.27 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/export.go:54.2,55.17 2 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/export.go:84.2,85.29 2 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/export.go:88.2,90.16 3 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/export.go:93.2,96.16 3 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/export.go:100.2,102.116 2 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/export.go:120.2,120.16 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/export.go:123.2,123.13 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/export.go:50.27,52.3 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/export.go:55.17,56.56 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/export.go:61.3,61.68 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/export.go:66.3,67.19 2 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/export.go:74.3,81.33 5 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/export.go:56.56,59.4 2 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/export.go:61.68,64.4 2 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/export.go:67.19,69.4 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/export.go:69.4,70.46 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/export.go:70.46,72.5 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/export.go:85.29,87.3 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/export.go:90.16,92.3 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/export.go:96.16,98.3 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/export.go:102.116,105.3 2 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/export.go:105.55,109.56 3 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/export.go:118.3,118.13 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/export.go:109.56,111.4 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/export.go:111.4,112.11 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/export.go:112.11,114.5 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/export.go:114.5,116.5 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/export.go:120.16,122.3 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/export.go:133.91,135.18 2 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/export.go:170.2,170.8 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/export.go:135.18,143.17 2 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/export.go:146.3,148.45 2 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/export.go:152.3,153.54 2 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/export.go:156.3,156.31 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/export.go:143.17,145.4 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/export.go:148.45,150.4 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/export.go:153.54,155.4 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/export.go:157.3,159.34 2 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/export.go:162.3,168.4 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/export.go:159.34,161.4 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/version.go:17.51,18.20 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/version.go:22.2,23.13 2 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/version.go:18.20,20.3 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/compact.go:8.13,11.2 2 1
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/compact.go:29.51,31.28 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/compact.go:35.2,37.16 3 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/compact.go:40.2,40.35 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/compact.go:44.2,44.13 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/compact.go:31.28,33.3 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/compact.go:37.16,39.3 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/compact.go:40.35,42.3 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/mount.go:12.13,17.2 4 1
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/mount_std.go:19.49,21.29 2 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/mount_std.go:26.2,27.16 2 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/mount_std.go:32.2,32.21 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/mount_std.go:37.2,38.16 2 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/mount_std.go:43.2,44.37 2 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/mount_std.go:48.2,48.13 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/mount_std.go:21.29,24.3 2 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/mount_std.go:27.16,30.3 2 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/mount_std.go:32.21,35.3 2 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/mount_std.go:38.16,40.3 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/mount_std.go:44.37,46.3 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/mount_std.go:56.30,58.2 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/mount_std.go:59.58,61.2 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/mount_std.go:68.33,70.2 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/mount_std.go:72.74,74.14 2 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/mount_std.go:77.2,77.33 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/mount_std.go:80.2,80.55 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/mount_std.go:74.14,76.3 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/mount_std.go:77.33,79.3 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/mount_std.go:85.36,87.2 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/mount_std.go:89.69,91.79 2 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/mount_std.go:97.2,97.78 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/mount_std.go:106.2,106.17 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/mount_std.go:91.79,92.38 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/mount_std.go:92.38,95.4 2 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/mount_std.go:97.78,98.33 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/mount_std.go:98.33,99.64 1 0
|
||||||
|
github.com/chrislusf/weed-fs/go/weed/mount_std.go:99.64,102.5 2 0
|
|
@ -108,12 +108,11 @@ func runExport(cmd *Command, args []string) bool {
|
||||||
n.Id, offset, n.Size, n.DiskSize(), n.IsGzipped(), ok, nv)
|
n.Id, offset, n.Size, n.DiskSize(), n.IsGzipped(), ok, nv)
|
||||||
if ok && nv.Size > 0 && int64(nv.Offset)*8 == offset {
|
if ok && nv.Size > 0 && int64(nv.Offset)*8 == offset {
|
||||||
return walker(vid, n, version)
|
return walker(vid, n, version)
|
||||||
|
}
|
||||||
|
if !ok {
|
||||||
|
glog.V(2).Infof("This seems deleted %d size %d", n.Id, n.Size)
|
||||||
} else {
|
} else {
|
||||||
if !ok {
|
glog.V(2).Infof("Skipping later-updated Id %d size %d", n.Id, n.Size)
|
||||||
glog.V(2).Infof("This seems deleted %d size %d", n.Id, n.Size)
|
|
||||||
} else {
|
|
||||||
glog.V(2).Infof("Skipping later-updated Id %d size %d", n.Id, n.Size)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
})
|
})
|
||||||
|
|
|
@ -87,7 +87,7 @@ func (WFS) Root() (fs.Node, error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (dir *Dir) ReadDir(ctx context.Context) ([]fuse.Dirent, error) {
|
func (dir *Dir) ReadDir(ctx context.Context) ([]fuse.Dirent, error) {
|
||||||
ret := make([]fuse.Dirent, 0)
|
var ret []fuse.Dirent
|
||||||
if dirs, e := filer.ListDirectories(*mountOptions.filer, dir.Path); e == nil {
|
if dirs, e := filer.ListDirectories(*mountOptions.filer, dir.Path); e == nil {
|
||||||
for _, d := range dirs.Directories {
|
for _, d := range dirs.Directories {
|
||||||
dirId := uint64(d.Id)
|
dirId := uint64(d.Id)
|
||||||
|
|
|
@ -120,7 +120,7 @@ func runServer(cmd *Command, args []string) bool {
|
||||||
|
|
||||||
folders := strings.Split(*volumeDataFolders, ",")
|
folders := strings.Split(*volumeDataFolders, ",")
|
||||||
maxCountStrings := strings.Split(*volumeMaxDataVolumeCounts, ",")
|
maxCountStrings := strings.Split(*volumeMaxDataVolumeCounts, ",")
|
||||||
maxCounts := make([]int, 0)
|
var maxCounts []int
|
||||||
for _, maxString := range maxCountStrings {
|
for _, maxString := range maxCountStrings {
|
||||||
if max, e := strconv.Atoi(maxString); e == nil {
|
if max, e := strconv.Atoi(maxString); e == nil {
|
||||||
maxCounts = append(maxCounts, max)
|
maxCounts = append(maxCounts, max)
|
||||||
|
|
|
@ -84,15 +84,14 @@ func (ms *MasterServer) dirAssignHandler(w http.ResponseWriter, r *http.Request)
|
||||||
if ms.Topo.FreeSpace() <= 0 {
|
if ms.Topo.FreeSpace() <= 0 {
|
||||||
writeJsonQuiet(w, r, http.StatusNotFound, operation.AssignResult{Error: "No free volumes left!"})
|
writeJsonQuiet(w, r, http.StatusNotFound, operation.AssignResult{Error: "No free volumes left!"})
|
||||||
return
|
return
|
||||||
} else {
|
}
|
||||||
ms.vgLock.Lock()
|
ms.vgLock.Lock()
|
||||||
defer ms.vgLock.Unlock()
|
defer ms.vgLock.Unlock()
|
||||||
if !ms.Topo.HasWritableVolume(option) {
|
if !ms.Topo.HasWritableVolume(option) {
|
||||||
if _, err = ms.vg.AutomaticGrowByType(option, ms.Topo); err != nil {
|
if _, err = ms.vg.AutomaticGrowByType(option, ms.Topo); err != nil {
|
||||||
writeJsonError(w, r, http.StatusInternalServerError,
|
writeJsonError(w, r, http.StatusInternalServerError,
|
||||||
fmt.Errorf("Cannot grow volume group! %v", err))
|
fmt.Errorf("Cannot grow volume group! %v", err))
|
||||||
return
|
return
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,7 +21,7 @@ import (
|
||||||
func (ms *MasterServer) collectionDeleteHandler(w http.ResponseWriter, r *http.Request) {
|
func (ms *MasterServer) collectionDeleteHandler(w http.ResponseWriter, r *http.Request) {
|
||||||
collection, ok := ms.Topo.GetCollection(r.FormValue("collection"))
|
collection, ok := ms.Topo.GetCollection(r.FormValue("collection"))
|
||||||
if !ok {
|
if !ok {
|
||||||
writeJsonError(w, r, http.StatusBadRequest, fmt.Errorf("collection %s does not exist!", r.FormValue("collection")))
|
writeJsonError(w, r, http.StatusBadRequest, fmt.Errorf("collection %s does not exist", r.FormValue("collection")))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
for _, server := range collection.ListVolumeServers() {
|
for _, server := range collection.ListVolumeServers() {
|
||||||
|
@ -125,7 +125,7 @@ func (ms *MasterServer) redirectHandler(w http.ResponseWriter, r *http.Request)
|
||||||
if machines != nil && len(machines) > 0 {
|
if machines != nil && len(machines) > 0 {
|
||||||
http.Redirect(w, r, "http://"+machines[rand.Intn(len(machines))].PublicUrl+r.URL.Path, http.StatusMovedPermanently)
|
http.Redirect(w, r, "http://"+machines[rand.Intn(len(machines))].PublicUrl+r.URL.Path, http.StatusMovedPermanently)
|
||||||
} else {
|
} else {
|
||||||
writeJsonError(w, r, http.StatusNotFound, fmt.Errorf("volume id %d not found.", volumeId))
|
writeJsonError(w, r, http.StatusNotFound, fmt.Errorf("volume id %d not found", volumeId))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -163,7 +163,7 @@ func postFollowingOneRedirect(target string, contentType string, b *bytes.Buffer
|
||||||
if statusCode == http.StatusMovedPermanently {
|
if statusCode == http.StatusMovedPermanently {
|
||||||
var urlStr string
|
var urlStr string
|
||||||
if urlStr = resp.Header.Get("Location"); urlStr == "" {
|
if urlStr = resp.Header.Get("Location"); urlStr == "" {
|
||||||
return errors.New(fmt.Sprintf("%d response missing Location header", resp.StatusCode))
|
return fmt.Errorf("%d response missing Location header", resp.StatusCode)
|
||||||
}
|
}
|
||||||
|
|
||||||
glog.V(0).Infoln("Post redirected to ", urlStr)
|
glog.V(0).Infoln("Post redirected to ", urlStr)
|
||||||
|
|
|
@ -54,7 +54,7 @@ func (vs *VolumeServer) freezeVolumeHandler(w http.ResponseWriter, r *http.Reque
|
||||||
func (vs *VolumeServer) statsDiskHandler(w http.ResponseWriter, r *http.Request) {
|
func (vs *VolumeServer) statsDiskHandler(w http.ResponseWriter, r *http.Request) {
|
||||||
m := make(map[string]interface{})
|
m := make(map[string]interface{})
|
||||||
m["Version"] = util.VERSION
|
m["Version"] = util.VERSION
|
||||||
ds := make([]*stats.DiskStatus, 0)
|
var ds []*stats.DiskStatus
|
||||||
for _, loc := range vs.store.Locations {
|
for _, loc := range vs.store.Locations {
|
||||||
if dir, e := filepath.Abs(loc.Directory); e == nil {
|
if dir, e := filepath.Abs(loc.Directory); e == nil {
|
||||||
ds = append(ds, stats.NewDiskStatus(dir))
|
ds = append(ds, stats.NewDiskStatus(dir))
|
||||||
|
|
Loading…
Reference in a new issue