From 4a2c3e73d0d5537c658f0022018a064b504e9d20 Mon Sep 17 00:00:00 2001 From: Todd Gruben Date: Tue, 17 Jun 2014 13:06:56 -0500 Subject: [PATCH] converted to main cql driver --- core/batch.go | 2 +- core/etcd.go | 2 +- core/http.go | 2 +- core/ping.go | 2 +- core/service.go | 2 +- db/db.go | 2 +- db/topology.go | 2 +- deps.json | 6 +++--- hold/hold.go | 2 +- hold/hold_test.go | 3 ++- index/storage_cass.go | 2 +- index/timeframe_test.go | 6 ++++-- interfaces/core.go | 2 +- query/parser.go | 2 +- query/planner.go | 2 +- query/planner_test.go | 3 ++- query/query.go | 2 +- transport/tcp.go | 3 ++- util/util_test.go | 2 +- 19 files changed, 27 insertions(+), 22 deletions(-) diff --git a/core/batch.go b/core/batch.go index ec4b58a07..eb15732c4 100644 --- a/core/batch.go +++ b/core/batch.go @@ -5,7 +5,7 @@ import ( "pilosa/db" . "pilosa/util" - "tux21b.org/v1/gocql/uuid" + "github.com/gocql/gocql/uuid" ) type BatchRequest struct { diff --git a/core/etcd.go b/core/etcd.go index aed4dd37d..ca5ca19c0 100644 --- a/core/etcd.go +++ b/core/etcd.go @@ -14,7 +14,7 @@ import ( "github.com/coreos/go-etcd/etcd" "github.com/davecgh/go-spew/spew" - "tux21b.org/v1/gocql/uuid" + "github.com/gocql/gocql/uuid" ) type TopologyMapper struct { diff --git a/core/http.go b/core/http.go index 1b8224640..0fd97101f 100644 --- a/core/http.go +++ b/core/http.go @@ -22,8 +22,8 @@ import ( notify "github.com/bitly/go-notify" "github.com/davecgh/go-spew/spew" + "github.com/gocql/gocql/uuid" "github.com/gorilla/websocket" - "tux21b.org/v1/gocql/uuid" ) type WebService struct { diff --git a/core/ping.go b/core/ping.go index 5b2c25ec0..634111aa2 100644 --- a/core/ping.go +++ b/core/ping.go @@ -5,7 +5,7 @@ import ( "pilosa/db" "time" - "tux21b.org/v1/gocql/uuid" + "github.com/gocql/gocql/uuid" ) type PingRequest struct { diff --git a/core/service.go b/core/service.go index 22e1d45dd..f1a7dc6e8 100644 --- a/core/service.go +++ b/core/service.go @@ -14,7 +14,7 @@ import ( "syscall" "github.com/coreos/go-etcd/etcd" - "tux21b.org/v1/gocql/uuid" + "github.com/gocql/gocql/uuid" ) type Service struct { diff --git a/db/db.go b/db/db.go index 57139433a..d0708c8be 100644 --- a/db/db.go +++ b/db/db.go @@ -3,7 +3,7 @@ package db import ( "encoding/gob" - "tux21b.org/v1/gocql/uuid" + "github.com/gocql/gocql/uuid" ) type Message struct { diff --git a/db/topology.go b/db/topology.go index dd83ea188..0f0cd909e 100644 --- a/db/topology.go +++ b/db/topology.go @@ -7,8 +7,8 @@ import ( "pilosa/util" "sync" + "github.com/gocql/gocql/uuid" "github.com/stathat/consistent" - "tux21b.org/v1/gocql/uuid" ) var FrameDoesNotExistError = errors.New("Frame does not exist.") diff --git a/deps.json b/deps.json index 67ea2828f..a3e7e1dc4 100644 --- a/deps.json +++ b/deps.json @@ -6,7 +6,7 @@ }, "etcd": { "repo": "github.com/coreos/go-etcd/etcd", - "version": "35c98e8c885757fab1824daa77cc0e24bf30e76b", + "version": "7745cfd7f8e619cc9e6be450238e6253a57a227f", "type": "git" }, "gkvlite": { @@ -20,8 +20,8 @@ "type": "git" }, "gocql": { - "repo": "tux21b.org/v1/gocql", - "version": "44eda643c1ae69e866e491b1c935c5b22e42350e", + "repo": "github.com/gocql/gocql", + "version": "f2deeb64d238e3a470f4489d734fab820cb44b4b", "type": "git" }, "goleveldb": { diff --git a/hold/hold.go b/hold/hold.go index 17affd846..295d95bea 100644 --- a/hold/hold.go +++ b/hold/hold.go @@ -4,7 +4,7 @@ import ( "errors" "time" - "tux21b.org/v1/gocql/uuid" + "github.com/gocql/gocql/uuid" ) type holdchan chan interface{} diff --git a/hold/hold_test.go b/hold/hold_test.go index 0ca3ce154..fa3f03d21 100644 --- a/hold/hold_test.go +++ b/hold/hold_test.go @@ -4,8 +4,9 @@ import ( "testing" "time" + "github.com/gocql/gocql/uuid" + . "github.com/smartystreets/goconvey/convey" - "tux21b.org/v1/gocql/uuid" ) func TestHoldChan(t *testing.T) { diff --git a/index/storage_cass.go b/index/storage_cass.go index 56a8ac804..05d051504 100644 --- a/index/storage_cass.go +++ b/index/storage_cass.go @@ -9,7 +9,7 @@ import ( "time" - "tux21b.org/v1/gocql" + "github.com/gocql/gocql" ) type CassandraStorage struct { diff --git a/index/timeframe_test.go b/index/timeframe_test.go index 097bcb7df..cbbfe5cd2 100644 --- a/index/timeframe_test.go +++ b/index/timeframe_test.go @@ -11,13 +11,15 @@ import ( func TestTimeFrame(t *testing.T) { + //print get_YMD_id(2014,3,28,1234) Convey("Test ID", t, func() { const shortForm = "2006-01-02 15:04" - x, _ := time.Parse(shortForm, "2014-01-01 10:03") + x, _ := time.Parse(shortForm, "1970-01-01 00:00:00") fmt.Println(x) - m := GetTimeIds(uint64(1), x, YMDH) + m := GetTimeIds(uint64(15027), x, YMD) spew.Dump(m) + fmt.Println("OK") So(1, ShouldEqual, 1) }) Convey("Test 1H", t, func() { diff --git a/interfaces/core.go b/interfaces/core.go index a705c4867..cd6677f05 100644 --- a/interfaces/core.go +++ b/interfaces/core.go @@ -3,7 +3,7 @@ package interfaces import ( "pilosa/db" - "tux21b.org/v1/gocql/uuid" + "github.com/gocql/gocql/uuid" ) type Transporter interface { diff --git a/query/parser.go b/query/parser.go index 1d2a41d6b..d5d1e2818 100644 --- a/query/parser.go +++ b/query/parser.go @@ -4,9 +4,9 @@ import ( "errors" "fmt" "strconv" - "tux21b.org/v1/gocql/uuid" "github.com/davecgh/go-spew/spew" + "github.com/gocql/gocql/uuid" ) var InvalidQueryError = errors.New("Invalid query format.") diff --git a/query/planner.go b/query/planner.go index 1736f4a7c..6883e58e5 100644 --- a/query/planner.go +++ b/query/planner.go @@ -5,7 +5,7 @@ import ( "math/rand" "pilosa/db" - "tux21b.org/v1/gocql/uuid" + "github.com/gocql/gocql/uuid" ) type PortableQueryStep interface { diff --git a/query/planner_test.go b/query/planner_test.go index 2e720c07f..e1b4d9fcb 100644 --- a/query/planner_test.go +++ b/query/planner_test.go @@ -4,8 +4,9 @@ import ( "pilosa/db" "pilosa/util" "testing" + + "github.com/gocql/gocql/uuid" . "github.com/smartystreets/goconvey/convey" - "tux21b.org/v1/gocql/uuid" ) func basic_database() (*db.Database, *db.Fragment) { diff --git a/query/query.go b/query/query.go index 76e560b6b..46748c94e 100644 --- a/query/query.go +++ b/query/query.go @@ -4,7 +4,7 @@ import ( "pilosa/db" "strings" - "tux21b.org/v1/gocql/uuid" + "github.com/gocql/gocql/uuid" ) type QueryInput interface{} diff --git a/transport/tcp.go b/transport/tcp.go index be0e94f89..1a13562d7 100644 --- a/transport/tcp.go +++ b/transport/tcp.go @@ -10,8 +10,9 @@ import ( "pilosa/db" "time" + notify "github.com/bitly/go-notify" - "tux21b.org/v1/gocql/uuid" + "github.com/gocql/gocql/uuid" ) type connection struct { diff --git a/util/util_test.go b/util/util_test.go index 12e1e496d..e90974734 100644 --- a/util/util_test.go +++ b/util/util_test.go @@ -3,8 +3,8 @@ package util import ( "testing" + "github.com/gocql/gocql/uuid" . "github.com/smartystreets/goconvey/convey" - "tux21b.org/v1/gocql/uuid" ) /*