From 1d0a314287219bd2592bda4ad049685a9e70380b Mon Sep 17 00:00:00 2001 From: jaffee Date: Mon, 28 Nov 2016 14:45:05 -0700 Subject: [PATCH] rename imports umbel->pilosa --- bench/client.go | 2 +- bench/query.go | 2 +- bench/query_test.go | 2 +- cmd/pilosactl/main.go | 21 ++++++++++----------- creator/creator.go | 2 +- 5 files changed, 14 insertions(+), 15 deletions(-) diff --git a/bench/client.go b/bench/client.go index c8a4c2c05..0025d93d2 100644 --- a/bench/client.go +++ b/bench/client.go @@ -2,7 +2,7 @@ package bench import ( "fmt" - "github.com/umbel/pilosa" + "github.com/pilosa/pilosa" ) func firstHostClient(hosts []string) (*pilosa.Client, error) { diff --git a/bench/query.go b/bench/query.go index 2cc035410..4989608c6 100644 --- a/bench/query.go +++ b/bench/query.go @@ -1,7 +1,7 @@ package bench import ( - "github.com/umbel/pilosa/pql" + "github.com/pilosa/pilosa/pql" "math/rand" ) diff --git a/bench/query_test.go b/bench/query_test.go index 0e2ecf454..13b0ad416 100644 --- a/bench/query_test.go +++ b/bench/query_test.go @@ -1,7 +1,7 @@ package bench_test import ( - "github.com/umbel/pilosa/bench" + "github.com/pilosa/pilosa/bench" "testing" ) diff --git a/cmd/pilosactl/main.go b/cmd/pilosactl/main.go index 4d2535166..95e2ee6a8 100644 --- a/cmd/pilosactl/main.go +++ b/cmd/pilosactl/main.go @@ -23,12 +23,11 @@ import ( "time" "unsafe" - "context" "encoding/json" - "github.com/umbel/pilosa" - "github.com/umbel/pilosa/bench" - "github.com/umbel/pilosa/creator" - "github.com/umbel/pilosa/roaring" + "github.com/pilosa/pilosa" + "github.com/pilosa/pilosa/bench" + "github.com/pilosa/pilosa/creator" + "github.com/pilosa/pilosa/roaring" ) var ( @@ -1239,7 +1238,7 @@ func (cmd *CreateCommand) create() (creator.Cluster, error) { } // Run executes cluster creation. -func (cmd *CreateCommand) Run() error { +func (cmd *CreateCommand) Run(ctx context.Context) error { var clus creator.Cluster switch cmd.Type { case "local": @@ -1395,7 +1394,7 @@ The following arguments are available: } // Run executes the benchmark agent. -func (cmd *BagentCommand) Run() error { +func (cmd *BagentCommand) Run(ctx context.Context) error { sbm := bench.Serial(cmd.Benchmarks...) err := sbm.Init(cmd.Hosts, cmd.AgentNum) if err != nil { @@ -1491,7 +1490,7 @@ pilosactl spawn configfile } // Run executes the main program execution. -func (cmd *BspawnCommand) Run() error { +func (cmd *BspawnCommand) Run(ctx context.Context) error { if len(cmd.PilosaHosts) == 0 { // must create cluster createCmd := NewCreateCommand(cmd.Stdin, cmd.Stdout, cmd.Stderr) @@ -1505,7 +1504,7 @@ func (cmd *BspawnCommand) Run() error { } switch cmd.Agents.Type { case "local": - return cmd.spawnLocal() + return cmd.spawnLocal(ctx) case "remote": return fmt.Errorf("remote type spawning is unimplemented") default: @@ -1513,7 +1512,7 @@ func (cmd *BspawnCommand) Run() error { } } -func (cmd *BspawnCommand) spawnLocal() error { +func (cmd *BspawnCommand) spawnLocal(ctx context.Context) error { agents := []*BagentCommand{} for _, sp := range cmd.Benchmarks { for i := 0; i < sp.Num; i++ { @@ -1532,7 +1531,7 @@ func (cmd *BspawnCommand) spawnLocal() error { wg.Add(1) go func(i int, agent *BagentCommand) { defer wg.Done() - errors[i] = agent.Run() + errors[i] = agent.Run(ctx) }(i, agent) } wg.Wait() diff --git a/creator/creator.go b/creator/creator.go index f117bf208..b07e4b467 100644 --- a/creator/creator.go +++ b/creator/creator.go @@ -8,7 +8,7 @@ import ( "path/filepath" "strconv" - "github.com/umbel/pilosa" + "github.com/pilosa/pilosa" ) type Cluster interface {