mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-09-07 17:15:56 +00:00
changed to cassandra storage and hard code connect for now
This commit is contained in:
parent
daf42d5694
commit
4a55e4a43e
2 changed files with 4 additions and 3 deletions
|
|
@ -168,7 +168,7 @@ type Fragment struct {
|
|||
}
|
||||
|
||||
func getStorage(db string, slice int, frame string) Storage {
|
||||
choice := 2
|
||||
choice := 3
|
||||
switch choice {
|
||||
case 1:
|
||||
return NewMemoryStorage()
|
||||
|
|
|
|||
|
|
@ -15,14 +15,15 @@ type CassandraStorage struct {
|
|||
func BuildSchema() {
|
||||
/*
|
||||
"CREATE KEYSPACE IF NOT EXISTS hotbox WITH strategy_class = SimpleStrategy AND strategy_options:replication_factor = 1"
|
||||
"CREATE TABLE IF NOT EXISTS bitmap ( bitmap_id bigint, db varchar, slice int, ChunkKey bigint, BlockIndex int, block bigint, PRIMARY KEY ((bitmap_id, db, slice),ChunkKey,BlockIndex) )
|
||||
CREATE TABLE IF NOT EXISTS bitmap ( bitmap_id bigint, db varchar, slice int, ChunkKey bigint, BlockIndex int, block bigint, PRIMARY KEY ((bitmap_id, db, slice),ChunkKey,BlockIndex) )
|
||||
"
|
||||
*/
|
||||
|
||||
}
|
||||
func NewCassStorage() Storage {
|
||||
obj := new(CassandraStorage)
|
||||
cluster := gocql.NewCluster("127.0.0.1")
|
||||
//cluster := gocql.NewCluster("127.0.0.1")
|
||||
cluster := gocql.NewCluster("10.87.110.249")
|
||||
cluster.Keyspace = "hotbox"
|
||||
cluster.Consistency = gocql.Quorum
|
||||
//cluster.ProtoVersion = 1
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue