mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-09-15 08:41:02 +00:00
Change frame meta and data to .meta and .data to be consistent with the DB dot files.
This commit is contained in:
parent
3ab1d34d9a
commit
3649a52c00
3 changed files with 4 additions and 5 deletions
1
db.go
1
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,
|
||||
|
|
|
|||
6
frame.go
6
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
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue