diff --git a/index/storage_cass.go b/index/storage_cass.go index 9293c3e9e..2d2ac7bbb 100644 --- a/index/storage_cass.go +++ b/index/storage_cass.go @@ -15,9 +15,10 @@ 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, frame varchar, slice int, filter int, ChunkKey bigint, BlockIndex int, block bigint, PRIMARY KEY ((bitmap_id, db, frame,slice),ChunkKey,BlockIndex) ) - " + "CREATE KEYSPACE IF NOT EXISTS hotbox WITH strategy_class = SimpleStrategy AND strategy_options:replication_factor = 1" + create keyspace if not exists hotbox with replication = { 'class': 'SimpleStrategy', 'replication_factor' : 1} and durable_writes = true; + CREATE TABLE IF NOT EXISTS bitmap ( bitmap_id bigint, db varchar, frame varchar, slice int, filter int, ChunkKey bigint, BlockIndex int, block bigint, PRIMARY KEY ((bitmap_id, db, frame,slice),ChunkKey,BlockIndex) ) + " */ } diff --git a/index/storage_test.go b/index/storage_test.go index c654e4e45..3c3ec6a3f 100644 --- a/index/storage_test.go +++ b/index/storage_test.go @@ -33,7 +33,7 @@ func TestStorage(t *testing.T) { */ c, err := net.DialTimeout("tcp", "127.0.0.1:9042", 100*time.Millisecond) if err != nil { - fmt.Println("NO cassandra skipping test") + fmt.Println("NO cassandra. Skipping test.") } else { c.Close() Convey("cassandra", t, func() { diff --git a/query/planner_test.go b/query/planner_test.go index a2cda6627..09995f3d0 100644 --- a/query/planner_test.go +++ b/query/planner_test.go @@ -14,12 +14,12 @@ func TestQueryPlanner(t *testing.T) { Convey("Basic query plan", t, func() { id1 := uuid.RandomUUID() - bm1 := db.Bitmap{10, "general"} + bm1 := db.Bitmap{10, "general", 0} inputs1 := []QueryInput{&bm1} query1 := Query{&id1, "get", inputs1, 0, 0} id2 := uuid.RandomUUID() - bm2 := db.Bitmap{20, "general"} + bm2 := db.Bitmap{20, "general", 0} inputs2 := []QueryInput{&bm2} query2 := Query{&id2, "get", inputs2, 0, 0}