diff options
| author | Chris Lu <chris.lu@gmail.com> | 2019-04-08 19:40:56 -0700 |
|---|---|---|
| committer | Chris Lu <chris.lu@gmail.com> | 2019-04-08 19:40:56 -0700 |
| commit | 000ee725fc473560d8e84046598ad469c52e432d (patch) | |
| tree | a571a20c1607c870e45c55467bede1ff8b8862a2 /weed/tools/read_index.go | |
| parent | a41ba791191fd5188c044fe540ae21550fe965c0 (diff) | |
| download | seaweedfs-000ee725fc473560d8e84046598ad469c52e432d.tar.xz seaweedfs-000ee725fc473560d8e84046598ad469c52e432d.zip | |
refactor Offset into a struct of bytes
Diffstat (limited to 'weed/tools/read_index.go')
| -rw-r--r-- | weed/tools/read_index.go | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/weed/tools/read_index.go b/weed/tools/read_index.go deleted file mode 100644 index d53f489ea..000000000 --- a/weed/tools/read_index.go +++ /dev/null @@ -1,29 +0,0 @@ -package main - -import ( - "flag" - "fmt" - "log" - "os" - - "github.com/chrislusf/seaweedfs/weed/storage" - "github.com/chrislusf/seaweedfs/weed/storage/types" -) - -var ( - indexFileName = flag.String("file", "", ".idx file to analyze") -) - -func main() { - flag.Parse() - indexFile, err := os.OpenFile(*indexFileName, os.O_RDONLY, 0644) - if err != nil { - log.Fatalf("Create Volume Index [ERROR] %s\n", err) - } - defer indexFile.Close() - - storage.WalkIndexFile(indexFile, func(key types.NeedleId, offset types.Offset, size uint32) error { - fmt.Printf("key %d, offset %d, size %d, nextOffset %d\n", key, offset*8, size, int64(offset)*types.NeedlePaddingSize+int64(size)) - return nil - }) -} |
