|
@ -2,9 +2,10 @@ package main |
|
|
|
|
|
|
|
|
import ( |
|
|
import ( |
|
|
"flag" |
|
|
"flag" |
|
|
"github.com/seaweedfs/seaweedfs/weed/util" |
|
|
|
|
|
"time" |
|
|
"time" |
|
|
|
|
|
|
|
|
|
|
|
"github.com/seaweedfs/seaweedfs/weed/util" |
|
|
|
|
|
|
|
|
"github.com/seaweedfs/seaweedfs/weed/glog" |
|
|
"github.com/seaweedfs/seaweedfs/weed/glog" |
|
|
"github.com/seaweedfs/seaweedfs/weed/storage" |
|
|
"github.com/seaweedfs/seaweedfs/weed/storage" |
|
|
"github.com/seaweedfs/seaweedfs/weed/storage/needle" |
|
|
"github.com/seaweedfs/seaweedfs/weed/storage/needle" |
|
@ -32,7 +33,7 @@ func (scanner *VolumeFileScanner4SeeDat) ReadNeedleBody() bool { |
|
|
|
|
|
|
|
|
func (scanner *VolumeFileScanner4SeeDat) VisitNeedle(n *needle.Needle, offset int64, needleHeader, needleBody []byte) error { |
|
|
func (scanner *VolumeFileScanner4SeeDat) VisitNeedle(n *needle.Needle, offset int64, needleHeader, needleBody []byte) error { |
|
|
t := time.Unix(int64(n.AppendAtNs)/int64(time.Second), int64(n.AppendAtNs)%int64(time.Second)) |
|
|
t := time.Unix(int64(n.AppendAtNs)/int64(time.Second), int64(n.AppendAtNs)%int64(time.Second)) |
|
|
glog.V(0).Infof("%d,%s%x offset %d size %d(%s) cookie %x appendedAt %v", |
|
|
|
|
|
|
|
|
glog.V(0).Infof("%d,%s%08x offset %d size %d(%s) cookie %08x appendedAt %v", |
|
|
*volumeId, n.Id, n.Cookie, offset, n.Size, util.BytesToHumanReadable(uint64(n.Size)), n.Cookie, t) |
|
|
*volumeId, n.Id, n.Cookie, offset, n.Size, util.BytesToHumanReadable(uint64(n.Size)), n.Cookie, t) |
|
|
return nil |
|
|
return nil |
|
|
} |
|
|
} |
|
|