diff --git a/core/service.go b/core/service.go index 1d3e9ac80..f29abd3a4 100644 --- a/core/service.go +++ b/core/service.go @@ -48,7 +48,7 @@ func NewService() *Service { service.WebService = NewWebService(service) service.Index = index.NewFragmentContainer() service.Hold = hold.NewHolder() - service.version = "0.0.16" + service.version = "0.0.18" service.name = "Cruncher" service.PrepareLogging() fmt.Printf("Pilosa %s\n", service.version) diff --git a/index/fragment_container.go b/index/fragment_container.go index 887538dc7..0a57282dc 100644 --- a/index/fragment_container.go +++ b/index/fragment_container.go @@ -244,15 +244,13 @@ func getStorage(db string, slice int, frame string, fid SUUID) Storage { full_dir := fmt.Sprintf("%s/%s/%d/%s/%s", base_path, db, slice, frame, SUUID_to_Hex(fid)) return NewLevelDBStorage(full_dir) case "cassandra": - host := config.GetString("cassandra_host") - if host == "" { - host = "localhost" - } + // host := config.GetString("cassandra_host") + hosts := config.GetStringArrayDefault("cassandra_servers", []string{"localhost"}) keyspace := config.GetString("cassandra_keyspace") if keyspace == "" { keyspace = "hotbox" } - return NewCassStorage(host, keyspace) + return NewCassStorage(hosts, keyspace) } return nil } diff --git a/index/storage_cass.go b/index/storage_cass.go index 93f5f737f..26b894f03 100644 --- a/index/storage_cass.go +++ b/index/storage_cass.go @@ -29,10 +29,10 @@ func BuildSchema() { */ } -func NewCassStorage(host, keyspace string) Storage { +func NewCassStorage(hosts []string, keyspace string) Storage { obj := new(CassandraStorage) //cluster := gocql.NewCluster("127.0.0.1") - cluster := gocql.NewCluster(host) + cluster := gocql.NewCluster(hosts...) cluster.Keyspace = keyspace //cluster.Consistency = gocql.Quorum cluster.Consistency = gocql.One