aboutsummaryrefslogtreecommitdiff
path: root/go/topology
diff options
context:
space:
mode:
Diffstat (limited to 'go/topology')
-rw-r--r--go/topology/node.go2
-rw-r--r--go/topology/node_list.go2
-rw-r--r--go/topology/node_list_test.go30
-rw-r--r--go/topology/topology.go2
-rw-r--r--go/topology/topology_compact.go2
-rw-r--r--go/topology/topology_event_handling.go2
6 files changed, 20 insertions, 20 deletions
diff --git a/go/topology/node.go b/go/topology/node.go
index c8ff55f07..cfd6f6489 100644
--- a/go/topology/node.go
+++ b/go/topology/node.go
@@ -1,8 +1,8 @@
package topology
import (
- "code.google.com/p/weed-fs/go/storage"
"code.google.com/p/weed-fs/go/glog"
+ "code.google.com/p/weed-fs/go/storage"
)
type NodeId string
diff --git a/go/topology/node_list.go b/go/topology/node_list.go
index db7685d82..bed151b54 100644
--- a/go/topology/node_list.go
+++ b/go/topology/node_list.go
@@ -1,8 +1,8 @@
package topology
import (
- "code.google.com/p/weed-fs/go/storage"
"code.google.com/p/weed-fs/go/glog"
+ "code.google.com/p/weed-fs/go/storage"
"math/rand"
)
diff --git a/go/topology/node_list_test.go b/go/topology/node_list_test.go
index 0037cbaa9..c7b165ea6 100644
--- a/go/topology/node_list_test.go
+++ b/go/topology/node_list_test.go
@@ -25,21 +25,21 @@ func TestXYZ(t *testing.T) {
t.Error("need to randomly pick 1 node")
}
- picked, ret = nl.RandomlyPickN(1, 0, "dc1")
- if !ret || len(picked) != 1 {
- t.Error("need to randomly pick 1 node")
- }
- if picked[0].Id() != "dc1" {
- t.Error("need to randomly pick 1 dc1 node")
- }
-
- picked, ret = nl.RandomlyPickN(2, 0, "dc1")
- if !ret || len(picked) != 2 {
- t.Error("need to randomly pick 1 node")
- }
- if picked[0].Id() != "dc1" {
- t.Error("need to randomly pick 2 with one dc1 node")
- }
+ picked, ret = nl.RandomlyPickN(1, 0, "dc1")
+ if !ret || len(picked) != 1 {
+ t.Error("need to randomly pick 1 node")
+ }
+ if picked[0].Id() != "dc1" {
+ t.Error("need to randomly pick 1 dc1 node")
+ }
+
+ picked, ret = nl.RandomlyPickN(2, 0, "dc1")
+ if !ret || len(picked) != 2 {
+ t.Error("need to randomly pick 1 node")
+ }
+ if picked[0].Id() != "dc1" {
+ t.Error("need to randomly pick 2 with one dc1 node")
+ }
picked, ret = nl.RandomlyPickN(4, 0, "")
if !ret || len(picked) != 4 {
diff --git a/go/topology/topology.go b/go/topology/topology.go
index f70c53ae6..d0e9fb42b 100644
--- a/go/topology/topology.go
+++ b/go/topology/topology.go
@@ -1,11 +1,11 @@
package topology
import (
+ "code.google.com/p/weed-fs/go/glog"
"code.google.com/p/weed-fs/go/sequence"
"code.google.com/p/weed-fs/go/storage"
"errors"
"io/ioutil"
- "code.google.com/p/weed-fs/go/glog"
"math/rand"
)
diff --git a/go/topology/topology_compact.go b/go/topology/topology_compact.go
index 45ddda174..6394c59c6 100644
--- a/go/topology/topology_compact.go
+++ b/go/topology/topology_compact.go
@@ -1,11 +1,11 @@
package topology
import (
+ "code.google.com/p/weed-fs/go/glog"
"code.google.com/p/weed-fs/go/storage"
"code.google.com/p/weed-fs/go/util"
"encoding/json"
"errors"
- "code.google.com/p/weed-fs/go/glog"
"net/url"
"time"
)
diff --git a/go/topology/topology_event_handling.go b/go/topology/topology_event_handling.go
index c780e2beb..f3b09c649 100644
--- a/go/topology/topology_event_handling.go
+++ b/go/topology/topology_event_handling.go
@@ -1,8 +1,8 @@
package topology
import (
- "code.google.com/p/weed-fs/go/storage"
"code.google.com/p/weed-fs/go/glog"
+ "code.google.com/p/weed-fs/go/storage"
"math/rand"
"time"
)