Change frame meta and data to .meta and .data to be consistent with the DB dot files.

This commit is contained in:
Travis 2017-03-10 15:47:17 -06:00
parent 3ab1d34d9a
commit 3649a52c00
3 changed files with 4 additions and 5 deletions

1
db.go
View file

@ -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,

View file

@ -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
}

View file

@ -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 {