mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-08-28 10:54:59 +00:00
Update import path
This commit updates the import path from: ``` pilosa/* ``` to: ``` github.com/umbel/pilosa/* ``` This follows standard Go convention and makes the project "go gettable". The README was also updated to reflect the changes.
This commit is contained in:
parent
6822dd99b5
commit
b06ecf3320
53 changed files with 175 additions and 459 deletions
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
default.etcd/
|
||||
55
README.md
55
README.md
|
|
@ -1,14 +1,55 @@
|
|||
# pilosa
|
||||
|
||||
requires etcd to be running on the local machine
|
||||
https://github.com/coreos/etcd
|
||||
Pilosa is a bitmap index database.
|
||||
|
||||
in order to build, just clone run depman in the project directory then launch with the following command line
|
||||
|
||||
PILOSA_CONFIG=default.yaml ../bin/pilosa-cruncher
|
||||
## Getting Started
|
||||
|
||||
That assumes that cassandra and etcd are running locally and that cassandra keyspace pilosa has been setup as describe in the file
|
||||
index/storage_cass.go
|
||||
To download the source, run `go get`:
|
||||
|
||||
If you don't want backend storage you can comment out storage_backend in the yaml file and it will just operate out of memory
|
||||
```sh
|
||||
$ go get github.com/umbel/pilosa
|
||||
```
|
||||
|
||||
You can update the dependencies to specific versions using [`depman`][depman]:
|
||||
|
||||
```sh
|
||||
$ go get github.com/vube/depman
|
||||
```
|
||||
|
||||
And then run `depman` from the project directory:
|
||||
|
||||
```sh
|
||||
$ cd $GOPATH/src/github.com/umbel/pilosa
|
||||
$ depman
|
||||
```
|
||||
|
||||
Now you can install the `pilosa` binary:
|
||||
|
||||
```sh
|
||||
$ go install github.com/umbel/pilosa/...
|
||||
```
|
||||
|
||||
Pilosa requires that [etcd][] is running locally for coordinating the cluster:
|
||||
|
||||
```sh
|
||||
# In another terminal window
|
||||
$ etcd
|
||||
```
|
||||
|
||||
Now run `pilosa` with the default configuration:
|
||||
|
||||
```sh
|
||||
PILOSA_CONFIG=default.yaml pilosa
|
||||
```
|
||||
|
||||
This setup assumes that cassandra and etcd are running locally and that
|
||||
cassandra keyspace pilosa has been setup as describe in the file
|
||||
`index/storage_cass.go`.
|
||||
|
||||
If you don't want backend storage you can comment out storage_backend in the
|
||||
yaml file and it will just operate out of memory.
|
||||
|
||||
[etcd]: https://github.com/coreos/etcd
|
||||
[depman]: https://github.com/vube/depman
|
||||
|
||||
|
|
|
|||
|
|
@ -1,101 +0,0 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"bufio"
|
||||
"flag"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"log"
|
||||
"net/http"
|
||||
"net/url"
|
||||
"os"
|
||||
"pilosa/db"
|
||||
"pilosa/index"
|
||||
"strconv"
|
||||
"strings"
|
||||
)
|
||||
|
||||
func post(database, base_url, id, compressed_string, frame_type string, slice int) {
|
||||
values := make(url.Values)
|
||||
values.Set("db", database)
|
||||
values.Set("id", id)
|
||||
values.Set("frame", frame_type)
|
||||
values.Set("slice", fmt.Sprintf("%d", slice))
|
||||
values.Set("bitmap", compressed_string)
|
||||
r, err := http.PostForm(base_url, values)
|
||||
if err != nil {
|
||||
log.Printf("error posting stat to stathat: %s", err)
|
||||
return
|
||||
}
|
||||
//body, _ := ioutil.ReadAll(r.Body)
|
||||
ioutil.ReadAll(r.Body)
|
||||
r.Body.Close()
|
||||
}
|
||||
|
||||
func Load(database, url, fullpath string, frame_type string) error {
|
||||
f, err := os.Open(fullpath)
|
||||
if err != nil {
|
||||
fmt.Printf("error opening file: %v\n", err)
|
||||
os.Exit(1)
|
||||
}
|
||||
r := bufio.NewReader(f)
|
||||
line, e := Readln(r)
|
||||
for e == nil {
|
||||
recs := strings.Split(line, "|")
|
||||
id := recs[0]
|
||||
log.Println(id)
|
||||
bm := index.NewBitmap()
|
||||
slice := -1
|
||||
last_slice := -1
|
||||
for _, pid := range recs[1:] {
|
||||
profile_id, _ := strconv.ParseUint(strings.TrimSpace(pid), 10, 64)
|
||||
|
||||
if slice < 0 {
|
||||
slice = db.GetSlice(profile_id)
|
||||
last_slice = slice
|
||||
} else {
|
||||
slice = db.GetSlice(profile_id)
|
||||
}
|
||||
if last_slice != slice {
|
||||
post(database, url, id, bm.ToCompressString(), frame_type, last_slice)
|
||||
bm = index.NewBitmap()
|
||||
last_slice = slice
|
||||
}
|
||||
|
||||
index.SetBit(bm, profile_id)
|
||||
|
||||
}
|
||||
if slice != -1 {
|
||||
post(database, url, id, bm.ToCompressString(), frame_type, slice)
|
||||
}
|
||||
|
||||
line, e = Readln(r)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// note, that variables are pointers
|
||||
var database = flag.String("database", "main", "Database Name")
|
||||
var host_port = flag.String("url", "127.0.0.1:15001", "pilosa point of entry host:port")
|
||||
var file = flag.String("file", "input_file", "input file name")
|
||||
var frame = flag.String("frame", "brand", "Fragment Type")
|
||||
|
||||
func Readln(r *bufio.Reader) (string, error) {
|
||||
var (
|
||||
isPrefix bool = true
|
||||
err error = nil
|
||||
line, ln []byte
|
||||
)
|
||||
for isPrefix && err == nil {
|
||||
line, isPrefix, err = r.ReadLine()
|
||||
ln = append(ln, line...)
|
||||
}
|
||||
return string(ln), err
|
||||
}
|
||||
|
||||
func main() {
|
||||
flag.Parse()
|
||||
full_url := fmt.Sprintf("http://%s/batch", *host_port)
|
||||
//fun(*file)
|
||||
Load(*database, full_url, *file, *frame)
|
||||
}
|
||||
|
|
@ -1,187 +0,0 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"flag"
|
||||
"fmt"
|
||||
"log"
|
||||
"net/http"
|
||||
"os"
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
"github.com/cactus/go-statsd-client/statsd"
|
||||
"github.com/coreos/go-etcd/etcd"
|
||||
)
|
||||
|
||||
type stringslice []string
|
||||
|
||||
func (self *stringslice) String() string {
|
||||
return fmt.Sprintf("%d", *self)
|
||||
}
|
||||
|
||||
func (self *stringslice) Set(value string) error {
|
||||
*self = append(*self, value)
|
||||
return nil
|
||||
}
|
||||
|
||||
var port uint
|
||||
var blocksize uint64
|
||||
var etcd_nodes stringslice
|
||||
var stats string
|
||||
var logfile string
|
||||
|
||||
func init() {
|
||||
flag.UintVar(&port, "port", 9000, "Port to run HTTP server on")
|
||||
flag.Uint64Var(&blocksize, "blocksize", 64, "Block size")
|
||||
flag.Var(&etcd_nodes, "etcd", "Etcd server")
|
||||
flag.StringVar(&stats, "statsd", "127.0.0.1:8125", "Statsd server")
|
||||
flag.StringVar(&logfile, "log", "/tmp/nexter.log", "Log file name")
|
||||
flag.Parse()
|
||||
}
|
||||
|
||||
type Req interface{}
|
||||
|
||||
type IncReq struct {
|
||||
id int
|
||||
ret chan uint64
|
||||
}
|
||||
|
||||
type DelReq struct {
|
||||
id int
|
||||
}
|
||||
|
||||
type Nexter struct {
|
||||
reqchan chan Req
|
||||
done chan bool
|
||||
stats *statsd.Client
|
||||
}
|
||||
|
||||
func (self *Nexter) countloop(ch chan uint64, id int, client *etcd.Client) {
|
||||
var start uint64
|
||||
var end uint64
|
||||
path := "nexter/" + strconv.Itoa(id)
|
||||
|
||||
for {
|
||||
node, err := client.Get(path, false, false)
|
||||
if err != nil {
|
||||
ee, ok := err.(*etcd.EtcdError)
|
||||
if ok && ee.ErrorCode == 100 { // node does not exist
|
||||
_, err := client.Create(path, "0", 0)
|
||||
if err != nil {
|
||||
ee, ok := err.(*etcd.EtcdError)
|
||||
// Catch race condition where another node did the same client.Create()
|
||||
if ok && ee.ErrorCode == 105 { // Node has been created
|
||||
continue
|
||||
} else {
|
||||
log.Fatal(err)
|
||||
}
|
||||
}
|
||||
continue
|
||||
} else {
|
||||
log.Fatal(err)
|
||||
}
|
||||
} else { // No error, get start of series from etcd node
|
||||
start, err = strconv.ParseUint(node.Node.Value, 10, 0)
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
end = start + blocksize
|
||||
}
|
||||
_, err = client.CompareAndSwap(path, strconv.FormatUint(end, 10), 0, strconv.FormatUint(start, 10), 0)
|
||||
if err != nil {
|
||||
log.Println("CAS failure", path, start, end)
|
||||
continue
|
||||
}
|
||||
self.stats.Gauge("nexter."+strconv.Itoa(id), int64(end), 1.0)
|
||||
log.Println("Allocated", id, start, end)
|
||||
for c := start; c < end; c += 1 {
|
||||
ch <- c
|
||||
log.Println("Send", id, c)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func (self *Nexter) loop() {
|
||||
counters := make(map[int]chan uint64)
|
||||
client := etcd.NewClient(etcd_nodes)
|
||||
for {
|
||||
select {
|
||||
case req := <-self.reqchan:
|
||||
switch req.(type) {
|
||||
case *IncReq:
|
||||
countreq := req.(*IncReq)
|
||||
counter, ok := counters[countreq.id]
|
||||
if !ok {
|
||||
counter = make(chan uint64)
|
||||
counters[countreq.id] = counter
|
||||
go self.countloop(counter, countreq.id, client)
|
||||
}
|
||||
go func() { countreq.ret <- <-counter }()
|
||||
case *DelReq:
|
||||
delreq := req.(*DelReq)
|
||||
delete(counters, delreq.id)
|
||||
path := "nexter/" + strconv.Itoa(delreq.id)
|
||||
client.Delete(path, true)
|
||||
default:
|
||||
}
|
||||
case <-self.done:
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func (self *Nexter) GetCount(id int) uint64 {
|
||||
ret := make(chan uint64)
|
||||
self.reqchan <- &IncReq{id, ret}
|
||||
return <-ret
|
||||
}
|
||||
func (self *Nexter) Delete(id int) {
|
||||
self.reqchan <- &DelReq{id}
|
||||
}
|
||||
func (self *Nexter) Stop() {
|
||||
self.done <- true
|
||||
}
|
||||
|
||||
func NewNexter() (*Nexter, error) {
|
||||
stats, err := statsd.New(stats, "")
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
nexter := &Nexter{make(chan Req), make(chan bool), stats}
|
||||
go nexter.loop()
|
||||
return nexter, nil
|
||||
}
|
||||
|
||||
func main() {
|
||||
logf, err := os.OpenFile(logfile, os.O_RDWR|os.O_CREATE|os.O_APPEND, 0666)
|
||||
if err != nil {
|
||||
log.Println("Error opening file: %v", err)
|
||||
}
|
||||
log.SetOutput(logf)
|
||||
log.Println("Starting Nexter...")
|
||||
nexter, err := NewNexter()
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
http.HandleFunc("/nexter/", func(w http.ResponseWriter, r *http.Request) {
|
||||
url := r.URL.Path
|
||||
splits := strings.Split(url, "/")
|
||||
if len(splits) < 3 {
|
||||
http.Error(w, "Missing property id", http.StatusBadRequest)
|
||||
return
|
||||
}
|
||||
id_string := splits[2]
|
||||
id, err := strconv.Atoi(id_string)
|
||||
if err != nil {
|
||||
http.Error(w, "Property id is not a number", http.StatusBadRequest)
|
||||
return
|
||||
}
|
||||
|
||||
num := nexter.GetCount(id)
|
||||
dec := json.NewEncoder(w)
|
||||
dec.Encode(num)
|
||||
})
|
||||
port_string := strconv.FormatUint(uint64(port), 10)
|
||||
http.ListenAndServe(":"+port_string, nil)
|
||||
}
|
||||
|
|
@ -2,15 +2,16 @@ package main
|
|||
|
||||
import (
|
||||
"flag"
|
||||
"os"
|
||||
"runtime/pprof"
|
||||
|
||||
log "github.com/cihub/seelog"
|
||||
"github.com/mitchellh/panicwrap"
|
||||
"os"
|
||||
"pilosa/config"
|
||||
"pilosa/core"
|
||||
"pilosa/cruncher"
|
||||
"pilosa/index"
|
||||
"pilosa/util"
|
||||
"runtime/pprof"
|
||||
"github.com/umbel/pilosa/config"
|
||||
"github.com/umbel/pilosa/core"
|
||||
"github.com/umbel/pilosa/cruncher"
|
||||
"github.com/umbel/pilosa/index"
|
||||
"github.com/umbel/pilosa/util"
|
||||
)
|
||||
|
||||
var (
|
||||
|
|
@ -2,11 +2,11 @@ package config
|
|||
|
||||
import (
|
||||
"errors"
|
||||
log "github.com/cihub/seelog"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"sync"
|
||||
|
||||
log "github.com/cihub/seelog"
|
||||
"launchpad.net/goyaml"
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ package config
|
|||
import (
|
||||
"os"
|
||||
"testing"
|
||||
|
||||
. "github.com/smartystreets/goconvey/convey"
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -2,9 +2,10 @@ package core
|
|||
|
||||
import (
|
||||
"encoding/gob"
|
||||
|
||||
log "github.com/cihub/seelog"
|
||||
"pilosa/db"
|
||||
"pilosa/util"
|
||||
"github.com/umbel/pilosa/db"
|
||||
"github.com/umbel/pilosa/util"
|
||||
)
|
||||
|
||||
type BatchRequest struct {
|
||||
|
|
|
|||
|
|
@ -3,19 +3,19 @@ package core
|
|||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
log "github.com/cihub/seelog"
|
||||
"os"
|
||||
"pilosa/config"
|
||||
"pilosa/db"
|
||||
"pilosa/util"
|
||||
"runtime/debug"
|
||||
"sort"
|
||||
"strconv"
|
||||
"strings"
|
||||
"sync"
|
||||
|
||||
log "github.com/cihub/seelog"
|
||||
"github.com/coreos/go-etcd/etcd"
|
||||
"github.com/davecgh/go-spew/spew"
|
||||
"github.com/umbel/pilosa/config"
|
||||
"github.com/umbel/pilosa/db"
|
||||
"github.com/umbel/pilosa/util"
|
||||
)
|
||||
|
||||
type TopologyMapper struct {
|
||||
|
|
|
|||
13
core/http.go
13
core/http.go
|
|
@ -8,25 +8,22 @@ import (
|
|||
"encoding/json"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
//"log"
|
||||
log "github.com/cihub/seelog"
|
||||
"net/http"
|
||||
"net/http/httputil"
|
||||
"pilosa/config"
|
||||
"pilosa/db"
|
||||
"pilosa/index"
|
||||
"pilosa/util"
|
||||
"reflect"
|
||||
"runtime"
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
"time"
|
||||
|
||||
notify "github.com/bitly/go-notify"
|
||||
log "github.com/cihub/seelog"
|
||||
"github.com/davecgh/go-spew/spew"
|
||||
"github.com/gorilla/websocket"
|
||||
// _ "net/http/pprof"
|
||||
"github.com/umbel/pilosa/config"
|
||||
"github.com/umbel/pilosa/db"
|
||||
"github.com/umbel/pilosa/index"
|
||||
"github.com/umbel/pilosa/util"
|
||||
)
|
||||
|
||||
type WebService struct {
|
||||
|
|
|
|||
|
|
@ -8,8 +8,9 @@ import (
|
|||
"encoding/base64"
|
||||
"encoding/binary"
|
||||
"errors"
|
||||
|
||||
log "github.com/cihub/seelog"
|
||||
"pilosa/index"
|
||||
"github.com/umbel/pilosa/index"
|
||||
)
|
||||
|
||||
func copy_raw(src [32]uint64) index.BlockArray {
|
||||
|
|
|
|||
|
|
@ -2,9 +2,10 @@ package core
|
|||
|
||||
import (
|
||||
"encoding/gob"
|
||||
"pilosa/db"
|
||||
"pilosa/util"
|
||||
"time"
|
||||
|
||||
"github.com/umbel/pilosa/db"
|
||||
"github.com/umbel/pilosa/util"
|
||||
)
|
||||
|
||||
type PingRequest struct {
|
||||
|
|
|
|||
|
|
@ -1,14 +1,14 @@
|
|||
package core
|
||||
|
||||
import (
|
||||
log "github.com/cihub/seelog"
|
||||
"pilosa/db"
|
||||
"pilosa/index"
|
||||
"pilosa/query"
|
||||
"pilosa/util"
|
||||
"sort"
|
||||
|
||||
log "github.com/cihub/seelog"
|
||||
"github.com/davecgh/go-spew/spew"
|
||||
"github.com/umbel/pilosa/db"
|
||||
"github.com/umbel/pilosa/index"
|
||||
"github.com/umbel/pilosa/query"
|
||||
"github.com/umbel/pilosa/util"
|
||||
)
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
package core
|
||||
|
||||
import (
|
||||
// "github.com/davecgh/go-spew/spew"
|
||||
"encoding/gob"
|
||||
|
||||
log "github.com/cihub/seelog"
|
||||
"pilosa/db"
|
||||
"pilosa/util"
|
||||
"github.com/umbel/pilosa/db"
|
||||
"github.com/umbel/pilosa/util"
|
||||
)
|
||||
|
||||
type RemoteSetBit struct {
|
||||
|
|
|
|||
|
|
@ -2,19 +2,18 @@ package core
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
//"log"
|
||||
log "github.com/cihub/seelog"
|
||||
"os"
|
||||
"os/signal"
|
||||
"pilosa/config"
|
||||
"pilosa/db"
|
||||
"pilosa/hold"
|
||||
"pilosa/index"
|
||||
"pilosa/interfaces"
|
||||
"pilosa/util"
|
||||
"syscall"
|
||||
|
||||
log "github.com/cihub/seelog"
|
||||
"github.com/coreos/go-etcd/etcd"
|
||||
"github.com/umbel/pilosa/config"
|
||||
"github.com/umbel/pilosa/db"
|
||||
"github.com/umbel/pilosa/hold"
|
||||
"github.com/umbel/pilosa/index"
|
||||
"github.com/umbel/pilosa/interfaces"
|
||||
"github.com/umbel/pilosa/util"
|
||||
)
|
||||
|
||||
type Service struct {
|
||||
|
|
|
|||
10
core/topn.go
10
core/topn.go
|
|
@ -2,13 +2,13 @@ package core
|
|||
|
||||
import (
|
||||
"encoding/gob"
|
||||
log "github.com/cihub/seelog"
|
||||
"pilosa/db"
|
||||
"pilosa/index"
|
||||
"pilosa/query"
|
||||
"pilosa/util"
|
||||
|
||||
log "github.com/cihub/seelog"
|
||||
"github.com/davecgh/go-spew/spew"
|
||||
"github.com/umbel/pilosa/db"
|
||||
"github.com/umbel/pilosa/index"
|
||||
"github.com/umbel/pilosa/query"
|
||||
"github.com/umbel/pilosa/util"
|
||||
)
|
||||
|
||||
type Task struct {
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
package cruncher
|
||||
|
||||
import (
|
||||
"pilosa/core"
|
||||
"pilosa/dispatch"
|
||||
"pilosa/executor"
|
||||
"pilosa/transport"
|
||||
"github.com/umbel/pilosa/core"
|
||||
"github.com/umbel/pilosa/dispatch"
|
||||
"github.com/umbel/pilosa/executor"
|
||||
"github.com/umbel/pilosa/transport"
|
||||
)
|
||||
|
||||
type Cruncher struct {
|
||||
|
|
|
|||
3
db/db.go
3
db/db.go
|
|
@ -2,7 +2,8 @@ package db
|
|||
|
||||
import (
|
||||
"encoding/gob"
|
||||
. "pilosa/util"
|
||||
|
||||
. "github.com/umbel/pilosa/util"
|
||||
)
|
||||
|
||||
type Message struct {
|
||||
|
|
|
|||
|
|
@ -3,12 +3,12 @@ package db
|
|||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
log "github.com/cihub/seelog"
|
||||
"pilosa/config"
|
||||
"pilosa/util"
|
||||
"sync"
|
||||
|
||||
log "github.com/cihub/seelog"
|
||||
"github.com/stathat/consistent"
|
||||
"github.com/umbel/pilosa/config"
|
||||
"github.com/umbel/pilosa/util"
|
||||
)
|
||||
|
||||
var FrameDoesNotExistError = errors.New("Frame does not exist.")
|
||||
|
|
|
|||
|
|
@ -2,11 +2,11 @@ package db
|
|||
|
||||
import (
|
||||
"log"
|
||||
"pilosa/util"
|
||||
"testing"
|
||||
|
||||
"github.com/davecgh/go-spew/spew"
|
||||
. "github.com/smartystreets/goconvey/convey"
|
||||
"github.com/umbel/pilosa/util"
|
||||
)
|
||||
|
||||
func TestTopology(t *testing.T) {
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
},
|
||||
"etcd": {
|
||||
"repo": "github.com/coreos/go-etcd/etcd",
|
||||
"version": "2af7a9525b09fb715b215a1fb852dd4814ef52b5",
|
||||
"version": "9847b93751a5fbaf227b893d172cee0104ac6427",
|
||||
"type": "git"
|
||||
},
|
||||
"gkvlite": {
|
||||
|
|
@ -21,12 +21,12 @@
|
|||
},
|
||||
"gocql": {
|
||||
"repo": "github.com/gocql/gocql",
|
||||
"version": "730396a4f658d3266f8b8be4fdaea06b6de92a82",
|
||||
"version": "f8fb76bb772442ea938e4be46ab1666e542411a5",
|
||||
"type": "git"
|
||||
},
|
||||
"goleveldb": {
|
||||
"repo": "github.com/syndtr/goleveldb/leveldb",
|
||||
"version": "63c9e642efad852f49e20a6f90194cae112fd2ac",
|
||||
"version": "183614d6b32571e867df4cf086f5480ceefbdfac",
|
||||
"type": "git"
|
||||
},
|
||||
"google-crypto": {
|
||||
|
|
|
|||
|
|
@ -2,11 +2,10 @@ package dispatch
|
|||
|
||||
import (
|
||||
log "github.com/cihub/seelog"
|
||||
"pilosa/core"
|
||||
"pilosa/db"
|
||||
"pilosa/query"
|
||||
|
||||
"github.com/davecgh/go-spew/spew"
|
||||
"github.com/umbel/pilosa/core"
|
||||
"github.com/umbel/pilosa/db"
|
||||
"github.com/umbel/pilosa/query"
|
||||
)
|
||||
|
||||
type Dispatch struct {
|
||||
|
|
|
|||
|
|
@ -2,13 +2,12 @@ package executor
|
|||
|
||||
import (
|
||||
log "github.com/cihub/seelog"
|
||||
"pilosa/config"
|
||||
"pilosa/core"
|
||||
"pilosa/db"
|
||||
"pilosa/query"
|
||||
"pilosa/util"
|
||||
|
||||
"github.com/davecgh/go-spew/spew"
|
||||
"github.com/umbel/pilosa/config"
|
||||
"github.com/umbel/pilosa/core"
|
||||
"github.com/umbel/pilosa/db"
|
||||
"github.com/umbel/pilosa/query"
|
||||
"github.com/umbel/pilosa/util"
|
||||
)
|
||||
|
||||
type Executor struct {
|
||||
|
|
|
|||
|
|
@ -3,11 +3,11 @@ package executor
|
|||
import (
|
||||
"bytes"
|
||||
"io/ioutil"
|
||||
"pilosa/query"
|
||||
"strings"
|
||||
|
||||
"github.com/davecgh/go-spew/spew"
|
||||
"github.com/robertkrimen/otto"
|
||||
"github.com/umbel/pilosa/query"
|
||||
)
|
||||
|
||||
func GetPlugin(file_name string, filter string, filters []string) interface{} {
|
||||
|
|
|
|||
|
|
@ -2,9 +2,10 @@ package hold
|
|||
|
||||
import (
|
||||
"errors"
|
||||
log "github.com/cihub/seelog"
|
||||
. "pilosa/util"
|
||||
"time"
|
||||
|
||||
log "github.com/cihub/seelog"
|
||||
. "github.com/umbel/pilosa/util"
|
||||
)
|
||||
|
||||
type holdchan chan interface{}
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
package hold
|
||||
|
||||
import (
|
||||
"pilosa/util"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
. "github.com/smartystreets/goconvey/convey"
|
||||
"github.com/umbel/pilosa/util"
|
||||
)
|
||||
|
||||
func TestHoldChan(t *testing.T) {
|
||||
|
|
|
|||
|
|
@ -8,9 +8,9 @@ import (
|
|||
"encoding/base64"
|
||||
"encoding/binary"
|
||||
"encoding/gob"
|
||||
log "github.com/cihub/seelog"
|
||||
"io/ioutil"
|
||||
|
||||
log "github.com/cihub/seelog"
|
||||
"github.com/yasushi-saito/rbtree"
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -1,12 +1,7 @@
|
|||
package index
|
||||
|
||||
import (
|
||||
// "fmt"
|
||||
// "math/rand"
|
||||
"testing"
|
||||
// "time"
|
||||
|
||||
// . "github.com/smartystreets/goconvey/convey"
|
||||
)
|
||||
|
||||
func TestBitmaps(t *testing.T) {
|
||||
|
|
|
|||
|
|
@ -1,20 +1,17 @@
|
|||
package index
|
||||
|
||||
import (
|
||||
"math/rand"
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
_ "github.com/go-sql-driver/mysql"
|
||||
)
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
log "github.com/cihub/seelog"
|
||||
"pilosa/config"
|
||||
"pilosa/util"
|
||||
"math/rand"
|
||||
"sort"
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
log "github.com/cihub/seelog"
|
||||
_ "github.com/go-sql-driver/mysql"
|
||||
"github.com/umbel/pilosa/config"
|
||||
"github.com/umbel/pilosa/util"
|
||||
)
|
||||
|
||||
var globalLock *sync.Mutex
|
||||
|
|
|
|||
|
|
@ -1,12 +1,8 @@
|
|||
package index
|
||||
|
||||
import (
|
||||
// "fmt"
|
||||
"math/rand"
|
||||
"testing"
|
||||
// "time"
|
||||
|
||||
// . "github.com/smartystreets/goconvey/convey"
|
||||
)
|
||||
|
||||
var (
|
||||
|
|
|
|||
|
|
@ -3,9 +3,10 @@ package index
|
|||
import (
|
||||
"bytes"
|
||||
"compress/gzip"
|
||||
log "github.com/cihub/seelog"
|
||||
"io/ioutil"
|
||||
"time"
|
||||
|
||||
log "github.com/cihub/seelog"
|
||||
)
|
||||
|
||||
type Result struct {
|
||||
|
|
|
|||
|
|
@ -2,20 +2,19 @@ package index
|
|||
|
||||
import (
|
||||
"database/sql"
|
||||
|
||||
"encoding/gob"
|
||||
"errors"
|
||||
"fmt"
|
||||
log "github.com/cihub/seelog"
|
||||
"pilosa/config"
|
||||
"pilosa/util"
|
||||
"strings"
|
||||
"sync"
|
||||
"syscall"
|
||||
"time"
|
||||
|
||||
log "github.com/cihub/seelog"
|
||||
_ "github.com/go-sql-driver/mysql"
|
||||
"github.com/golang/groupcache/lru"
|
||||
"github.com/umbel/pilosa/config"
|
||||
"github.com/umbel/pilosa/util"
|
||||
)
|
||||
|
||||
type FragmentContainer struct {
|
||||
|
|
|
|||
|
|
@ -3,11 +3,8 @@ package index
|
|||
import (
|
||||
"testing"
|
||||
|
||||
// "io/ioutil"
|
||||
// "time"
|
||||
"pilosa/util"
|
||||
|
||||
. "github.com/smartystreets/goconvey/convey"
|
||||
"github.com/umbel/pilosa/util"
|
||||
)
|
||||
|
||||
func TestFragment(t *testing.T) {
|
||||
|
|
|
|||
|
|
@ -3,11 +3,11 @@ package index
|
|||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
log "github.com/cihub/seelog"
|
||||
"pilosa/config"
|
||||
"pilosa/util"
|
||||
|
||||
log "github.com/cihub/seelog"
|
||||
"github.com/golang/groupcache/lru"
|
||||
"github.com/umbel/pilosa/config"
|
||||
"github.com/umbel/pilosa/util"
|
||||
)
|
||||
|
||||
type General struct {
|
||||
|
|
|
|||
|
|
@ -3,14 +3,12 @@ package index
|
|||
// #cgo CFLAGS:-mpopcnt
|
||||
|
||||
import (
|
||||
log "github.com/cihub/seelog"
|
||||
"pilosa/config"
|
||||
"pilosa/util"
|
||||
|
||||
//"sync/atomic"
|
||||
"time"
|
||||
|
||||
log "github.com/cihub/seelog"
|
||||
"github.com/gocql/gocql"
|
||||
"github.com/umbel/pilosa/config"
|
||||
"github.com/umbel/pilosa/util"
|
||||
)
|
||||
|
||||
type CassandraStorage struct {
|
||||
|
|
|
|||
|
|
@ -6,12 +6,11 @@ import (
|
|||
"bytes"
|
||||
"encoding/binary"
|
||||
"log"
|
||||
"pilosa/util"
|
||||
"time"
|
||||
|
||||
"github.com/syndtr/goleveldb/leveldb"
|
||||
. "github.com/syndtr/goleveldb/leveldb/util"
|
||||
|
||||
"time"
|
||||
"github.com/umbel/pilosa/util"
|
||||
)
|
||||
|
||||
type LevelDBStorage struct {
|
||||
|
|
|
|||
|
|
@ -6,9 +6,6 @@ import (
|
|||
"testing"
|
||||
"time"
|
||||
|
||||
// "io/ioutil"
|
||||
// "time"
|
||||
|
||||
. "github.com/smartystreets/goconvey/convey"
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
package interfaces
|
||||
|
||||
import (
|
||||
"pilosa/db"
|
||||
"pilosa/util"
|
||||
"github.com/umbel/pilosa/db"
|
||||
"github.com/umbel/pilosa/util"
|
||||
)
|
||||
|
||||
type Transporter interface {
|
||||
|
|
|
|||
|
|
@ -3,10 +3,11 @@ package query
|
|||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
log "github.com/cihub/seelog"
|
||||
"strings"
|
||||
"unicode"
|
||||
"unicode/utf8"
|
||||
|
||||
log "github.com/cihub/seelog"
|
||||
)
|
||||
|
||||
const (
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ package query
|
|||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
. "github.com/smartystreets/goconvey/convey"
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -3,13 +3,13 @@ package query
|
|||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
log "github.com/cihub/seelog"
|
||||
"pilosa/index"
|
||||
"pilosa/util"
|
||||
"strconv"
|
||||
"time"
|
||||
|
||||
log "github.com/cihub/seelog"
|
||||
"github.com/davecgh/go-spew/spew"
|
||||
"github.com/umbel/pilosa/index"
|
||||
"github.com/umbel/pilosa/util"
|
||||
)
|
||||
|
||||
var InvalidQueryError = errors.New("Invalid query format.")
|
||||
|
|
|
|||
|
|
@ -4,14 +4,14 @@ import (
|
|||
"encoding/gob"
|
||||
"errors"
|
||||
"fmt"
|
||||
log "github.com/cihub/seelog"
|
||||
"math/rand"
|
||||
"pilosa/db"
|
||||
"pilosa/index"
|
||||
"pilosa/util"
|
||||
"time"
|
||||
|
||||
log "github.com/cihub/seelog"
|
||||
"github.com/davecgh/go-spew/spew"
|
||||
"github.com/umbel/pilosa/db"
|
||||
"github.com/umbel/pilosa/index"
|
||||
"github.com/umbel/pilosa/util"
|
||||
)
|
||||
|
||||
type PortableQueryStep interface {
|
||||
|
|
|
|||
|
|
@ -2,12 +2,12 @@ package query
|
|||
|
||||
import (
|
||||
"log"
|
||||
"pilosa/db"
|
||||
"pilosa/util"
|
||||
"testing"
|
||||
|
||||
"github.com/davecgh/go-spew/spew"
|
||||
. "github.com/smartystreets/goconvey/convey"
|
||||
"github.com/umbel/pilosa/db"
|
||||
"github.com/umbel/pilosa/util"
|
||||
)
|
||||
|
||||
func basic_database() (*db.Database, *db.Fragment) {
|
||||
|
|
|
|||
|
|
@ -1,10 +1,11 @@
|
|||
package query
|
||||
|
||||
import (
|
||||
log "github.com/cihub/seelog"
|
||||
"pilosa/db"
|
||||
"pilosa/util"
|
||||
"strings"
|
||||
|
||||
log "github.com/cihub/seelog"
|
||||
"github.com/umbel/pilosa/db"
|
||||
"github.com/umbel/pilosa/util"
|
||||
)
|
||||
|
||||
type QueryInput interface{}
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ package query
|
|||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
. "github.com/smartystreets/goconvey/convey"
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,8 @@ package transport
|
|||
|
||||
import (
|
||||
"log"
|
||||
"pilosa/db"
|
||||
|
||||
"github.com/umbel/pilosa/db"
|
||||
)
|
||||
|
||||
type HttpTransport struct {
|
||||
|
|
|
|||
|
|
@ -1 +0,0 @@
|
|||
package transport
|
||||
|
|
@ -3,17 +3,16 @@ package transport
|
|||
import (
|
||||
"encoding/gob"
|
||||
"fmt"
|
||||
log "github.com/cihub/seelog"
|
||||
"net"
|
||||
"os"
|
||||
"pilosa/config"
|
||||
"pilosa/core"
|
||||
"pilosa/db"
|
||||
. "pilosa/util"
|
||||
|
||||
"time"
|
||||
|
||||
notify "github.com/bitly/go-notify"
|
||||
log "github.com/cihub/seelog"
|
||||
"github.com/umbel/pilosa/config"
|
||||
"github.com/umbel/pilosa/core"
|
||||
"github.com/umbel/pilosa/db"
|
||||
. "github.com/umbel/pilosa/util"
|
||||
)
|
||||
|
||||
type connection struct {
|
||||
|
|
|
|||
|
|
@ -1 +0,0 @@
|
|||
package transport
|
||||
|
|
@ -1,20 +0,0 @@
|
|||
package transport
|
||||
|
||||
import (
|
||||
"testing"
|
||||
//"pilosa/db"
|
||||
. "github.com/smartystreets/goconvey/convey"
|
||||
)
|
||||
|
||||
func TestHttpTransport(t *testing.T) {
|
||||
Convey("Test HTTP transport", t, func() {
|
||||
/*
|
||||
var com Transporter
|
||||
com = NewHttpTransport(9009)
|
||||
com.Init()
|
||||
com.Send("derp", &db.Message{"derp", 42, db.Location{}})
|
||||
com.Close()
|
||||
So(1, ShouldEqual, 1)
|
||||
*/
|
||||
})
|
||||
}
|
||||
|
|
@ -5,12 +5,12 @@ import (
|
|||
"encoding/binary"
|
||||
"encoding/hex"
|
||||
"fmt"
|
||||
log "github.com/cihub/seelog"
|
||||
"math/rand"
|
||||
"os"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
log "github.com/cihub/seelog"
|
||||
"github.com/gocql/gocql"
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
package util
|
||||
|
||||
import (
|
||||
log "github.com/cihub/seelog"
|
||||
"pilosa/config"
|
||||
"time"
|
||||
|
||||
"github.com/cactus/go-statsd-client/statsd"
|
||||
log "github.com/cihub/seelog"
|
||||
"github.com/umbel/pilosa/config"
|
||||
)
|
||||
|
||||
type args struct {
|
||||
|
|
|
|||
|
|
@ -3,10 +3,10 @@ package util
|
|||
import (
|
||||
"io"
|
||||
"os"
|
||||
"pilosa/config"
|
||||
"strings"
|
||||
|
||||
"github.com/kr/s3/s3util"
|
||||
"github.com/umbel/pilosa/config"
|
||||
)
|
||||
|
||||
func setup_storage() {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue