Merge pull request #3737 from influxdb/jw-wal-dir

Ensure wal-dir has a default value
pull/3714/head
Jason Wilder 2015-08-19 13:53:37 -06:00
commit 0b2aa62172
1 changed files with 3 additions and 0 deletions

View File

@ -92,6 +92,7 @@ func NewDemoConfig() (*Config, error) {
c.Meta.Dir = filepath.Join(homeDir, ".influxdb/meta") c.Meta.Dir = filepath.Join(homeDir, ".influxdb/meta")
c.Data.Dir = filepath.Join(homeDir, ".influxdb/data") c.Data.Dir = filepath.Join(homeDir, ".influxdb/data")
c.HintedHandoff.Dir = filepath.Join(homeDir, ".influxdb/hh") c.HintedHandoff.Dir = filepath.Join(homeDir, ".influxdb/hh")
c.Data.WALDir = filepath.Join(homeDir, ".influxdb/wal")
c.Admin.Enabled = true c.Admin.Enabled = true
c.Monitoring.Enabled = false c.Monitoring.Enabled = false
@ -107,6 +108,8 @@ func (c *Config) Validate() error {
return errors.New("Data.Dir must be specified") return errors.New("Data.Dir must be specified")
} else if c.HintedHandoff.Dir == "" { } else if c.HintedHandoff.Dir == "" {
return errors.New("HintedHandoff.Dir must be specified") return errors.New("HintedHandoff.Dir must be specified")
} else if c.Data.WALDir == "" {
return errors.New("Data.WALDir must be specified")
} }
for _, g := range c.Graphites { for _, g := range c.Graphites {