func NewFileStore(dir string) *FileStore { db, rp := tsdb.DecodeStorePath(dir) return &FileStore{ dir: dir, lastModified: time.Now(), Logger: log.New(os.Stderr, "[filestore] ", log.LstdFlags), statMap: influxdb.NewStatistics( "tsm1_filestore:"+dir, "tsm1_filestore", map[string]string{"path": dir, "database": db, "retentionPolicy": rp}, ), } }
func NewWAL(path string) *WAL { db, rp := tsdb.DecodeStorePath(path) return &WAL{ path: path, // these options should be overriden by any options in the config LogOutput: os.Stderr, SegmentSize: DefaultSegmentSize, logger: log.New(os.Stderr, "[tsm1wal] ", log.LstdFlags), closing: make(chan struct{}), statMap: influxdb.NewStatistics( "tsm1_wal:"+path, "tsm1_wal", map[string]string{"path": path, "database": db, "retentionPolicy": rp}, ), } }