diff options
| author | Chris Lu <chris.lu@uber.com> | 2019-03-17 23:28:43 -0700 |
|---|---|---|
| committer | Chris Lu <chris.lu@uber.com> | 2019-03-17 23:28:43 -0700 |
| commit | 44647a46c0dc82350cc994da0784f3c3936270d6 (patch) | |
| tree | e2255ae420748b3c39af9868fd98857715e05076 /unmaintained/see_dat/see_dat.go | |
| parent | 8b26d1574005a993659245599d3db40d3308e011 (diff) | |
| download | seaweedfs-44647a46c0dc82350cc994da0784f3c3936270d6.tar.xz seaweedfs-44647a46c0dc82350cc994da0784f3c3936270d6.zip | |
needle scanner read appendAtNs
Diffstat (limited to 'unmaintained/see_dat/see_dat.go')
| -rw-r--r-- | unmaintained/see_dat/see_dat.go | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/unmaintained/see_dat/see_dat.go b/unmaintained/see_dat/see_dat.go index f79c0a6a9..28d6447d6 100644 --- a/unmaintained/see_dat/see_dat.go +++ b/unmaintained/see_dat/see_dat.go @@ -4,6 +4,7 @@ import ( "flag" "github.com/chrislusf/seaweedfs/weed/glog" "github.com/chrislusf/seaweedfs/weed/storage" + "time" ) var ( @@ -22,11 +23,12 @@ func (scanner *VolumeFileScanner4SeeDat) VisitSuperBlock(superBlock storage.Supe } func (scanner *VolumeFileScanner4SeeDat) ReadNeedleBody() bool { - return false + return true } func (scanner *VolumeFileScanner4SeeDat) VisitNeedle(n *storage.Needle, offset int64) error { - glog.V(0).Infof("%d,%s%x offset %d size %d cookie %x", *volumeId, n.Id, n.Cookie, offset, n.Size, n.Cookie) + 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 cookie %x appendedAt %v", *volumeId, n.Id, n.Cookie, offset, n.Size, n.Cookie, t) return nil } |
