1
0
Fork 0
mirror of https://github.com/chrislusf/seaweedfs synced 2024-07-03 23:56:41 +02:00
This commit is contained in:
Chris Lu 2019-04-18 00:19:18 -07:00
parent b09e8dbb37
commit b142f9f1d5
9 changed files with 28 additions and 29 deletions

View file

@ -88,7 +88,7 @@ func (fs *FilerServer) moveFolderSubEntries(ctx context.Context, oldParent filer
return nil
}
func (fs *FilerServer) moveSelfEntry(ctx context.Context, oldParent filer2.FullPath, entry *filer2.Entry, newParent filer2.FullPath, newName string, events *MoveEvents) (error) {
func (fs *FilerServer) moveSelfEntry(ctx context.Context, oldParent filer2.FullPath, entry *filer2.Entry, newParent filer2.FullPath, newName string, events *MoveEvents) error {
oldPath, newPath := oldParent.Child(entry.Name()), newParent.Child(newName)

View file

@ -97,9 +97,9 @@ func (vs *VolumeServer) VolumeCopy(ctx context.Context, req *volume_server_pb.Vo
}
/**
only check the the differ of the file size
todo: maybe should check the received count and deleted count of the volume
*/
only check the the differ of the file size
todo: maybe should check the received count and deleted count of the volume
*/
func checkCopyFiles(originFileInf *volume_server_pb.ReadVolumeFileStatusResponse, idxFileName, datFileName string) error {
stat, err := os.Stat(idxFileName)
if err != nil {

View file

@ -56,7 +56,7 @@ func (c *commandFsMetaLoad) Do(args []string, commandEnv *commandEnv, writer io.
for {
if n, err := dst.Read(sizeBuf); n != 4 {
if err == io.EOF{
if err == io.EOF {
return nil
}
return err

View file

@ -51,7 +51,7 @@ func (ce *commandEnv) parseUrl(input string) (filerServer string, filerPort int6
func (ce *commandEnv) isDirectory(ctx context.Context, filerServer string, filerPort int64, path string) bool {
return ce.checkDirectory(ctx,filerServer,filerPort,path) == nil
return ce.checkDirectory(ctx, filerServer, filerPort, path) == nil
}

View file

@ -60,7 +60,6 @@ func (mm mapMetric) MaybeSetMaxFileKey(key NeedleId) {
}
}
func newNeedleMapMetricFromIndexFile(r *os.File) (mm *mapMetric, err error) {
mm = &mapMetric{}
var bf *bloom.BloomFilter

View file

@ -79,22 +79,22 @@ func (v *Volume) Size() int64 {
return 0 // -1 causes integer overflow and the volume to become unwritable.
}
func (v *Volume)IndexFileSize() uint64 {
func (v *Volume) IndexFileSize() uint64 {
return v.nm.IndexFileSize()
}
func (v *Volume)DataFileSize() uint64 {
func (v *Volume) DataFileSize() uint64 {
return uint64(v.Size())
}
/**
unix time in seconds
*/
func (v *Volume)LastModifiedTime() uint64 {
*/
func (v *Volume) LastModifiedTime() uint64 {
return v.lastModifiedTime
}
func (v *Volume)FileCount() uint64 {
func (v *Volume) FileCount() uint64 {
return uint64(v.nm.FileCount())
}