From 3649a52c00fe77ba8cf7e5dac2b1987c4c08802e Mon Sep 17 00:00:00 2001 From: Travis Date: Fri, 10 Mar 2017 15:47:17 -0600 Subject: [PATCH] Change frame `meta` and `data` to `.meta` and `.data` to be consistent with the DB dot files. --- db.go | 1 - frame.go | 6 +++--- frame_test.go | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/db.go b/db.go index 528369787..fef92e755 100644 --- a/db.go +++ b/db.go @@ -188,7 +188,6 @@ func (db *DB) loadMeta() error { // saveMeta writes meta data for the database. func (db *DB) saveMeta() error { // Marshal metadata. - buf, err := proto.Marshal(&internal.DB{ TimeQuantum: string(db.timeQuantum), ColumnLabel: db.columnLabel, diff --git a/frame.go b/frame.go index fa47517c5..8ff32f761 100644 --- a/frame.go +++ b/frame.go @@ -58,7 +58,7 @@ func NewFrame(path, db, name string) (*Frame, error) { name: name, fragments: make(map[uint64]*Fragment), - bitmapAttrStore: NewAttrStore(filepath.Join(path, "data")), + bitmapAttrStore: NewAttrStore(filepath.Join(path, ".data")), stats: NopStatsClient, @@ -202,7 +202,7 @@ func (f *Frame) loadMeta() error { var pb internal.Frame // Read data from meta file. - buf, err := ioutil.ReadFile(filepath.Join(f.path, "meta")) + buf, err := ioutil.ReadFile(filepath.Join(f.path, ".meta")) if os.IsNotExist(err) { f.timeQuantum = "" f.rowLabel = DefaultRowLabel @@ -234,7 +234,7 @@ func (f *Frame) saveMeta() error { } // Write to meta file. - if err := ioutil.WriteFile(filepath.Join(f.path, "meta"), buf, 0666); err != nil { + if err := ioutil.WriteFile(filepath.Join(f.path, ".meta"), buf, 0666); err != nil { return err } diff --git a/frame_test.go b/frame_test.go index 891ff203a..5b03cfb3e 100644 --- a/frame_test.go +++ b/frame_test.go @@ -106,7 +106,7 @@ func (f *Frame) Reopen() error { return nil } -// NewFrame doesnot return with invalid name +// NewFrame does not return a frame when name is invalid. func TestFrame_NameRestriction(t *testing.T) { path, err := ioutil.TempDir("", "pilosa-frame-") if err != nil {