mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2025-10-22 03:57:23 +08:00
extend export command to show tombstone + change output format to CSV
merging https://github.com/chrislusf/seaweedfs/pull/610 and add "-limit" option
This commit is contained in:
@@ -258,3 +258,7 @@ func ParseNeedleIdCookie(key_hash_string string) (NeedleId, Cookie, error) {
|
||||
}
|
||||
return needleId, cookie, nil
|
||||
}
|
||||
|
||||
func (n *Needle) LastModifiedString() string {
|
||||
return time.Unix(int64(n.LastModified), 0).Format("2006-01-02T15:04:05")
|
||||
}
|
||||
|
@@ -217,7 +217,11 @@ func ScanVolumeFile(dirname string, collection string, id VolumeId,
|
||||
glog.V(4).Infof("Adjusting n.Size %d=>0 rest:%d=>%d %+v", oldSize, oldRest, rest, n)
|
||||
}
|
||||
}
|
||||
if err = visitNeedle(n, offset); err != nil {
|
||||
err = visitNeedle(n, offset)
|
||||
if err == io.EOF {
|
||||
return nil
|
||||
}
|
||||
if err != nil {
|
||||
glog.V(0).Infof("visit needle error: %v", err)
|
||||
}
|
||||
offset += NeedleEntrySize + rest
|
||||
|
Reference in New Issue
Block a user