mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-10-09 04:17:51 +00:00
Rename structs and funcs.
NodeSet -> MemberSet URISet -> NodeSet AddNode -> AddNodeBasicSorted AddHost -> AddNode
This commit is contained in:
parent
ed1b4fcc2e
commit
f4b0729458
13 changed files with 203 additions and 203 deletions
28
broadcast.go
28
broadcast.go
|
|
@ -22,37 +22,37 @@ import (
|
|||
"github.com/pilosa/pilosa/internal"
|
||||
)
|
||||
|
||||
// NodeSet represents an interface for Node membership and inter-node communication.
|
||||
type NodeSet interface {
|
||||
// MemberSet represents an interface for Node membership and inter-node communication.
|
||||
type MemberSet interface {
|
||||
// Returns a list of all Nodes in the cluster
|
||||
Nodes() []*Node
|
||||
|
||||
// Open starts any network activity implemented by the NodeSet
|
||||
// Open starts any network activity implemented by the MemberSet
|
||||
Open() error
|
||||
}
|
||||
|
||||
// StaticNodeSet represents a basic NodeSet for testing.
|
||||
type StaticNodeSet struct {
|
||||
// StaticMemberSet represents a basic MemberSet for testing.
|
||||
type StaticMemberSet struct {
|
||||
nodes []*Node
|
||||
}
|
||||
|
||||
// NewStaticNodeSet creates a statically defined NodeSet.
|
||||
func NewStaticNodeSet() *StaticNodeSet {
|
||||
return &StaticNodeSet{}
|
||||
// NewStaticMemberSet creates a statically defined MemberSet.
|
||||
func NewStaticMemberSet() *StaticMemberSet {
|
||||
return &StaticMemberSet{}
|
||||
}
|
||||
|
||||
// Nodes implements the NodeSet interface and returns a list of nodes in the cluster.
|
||||
func (s *StaticNodeSet) Nodes() []*Node {
|
||||
// Nodes implements the MemberSet interface and returns a list of nodes in the cluster.
|
||||
func (s *StaticMemberSet) Nodes() []*Node {
|
||||
return s.nodes
|
||||
}
|
||||
|
||||
// Open implements the NodeSet interface to start network activity, but for a static NodeSet it does nothing.
|
||||
func (s *StaticNodeSet) Open() error {
|
||||
// Open implements the MemberSet interface to start network activity, but for a static MemberSet it does nothing.
|
||||
func (s *StaticMemberSet) Open() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// Join sets the NodeSet nodes to the slice of Nodes passed in.
|
||||
func (s *StaticNodeSet) Join(nodes []*Node) error {
|
||||
// Join sets the MemberSet nodes to the slice of Nodes passed in.
|
||||
func (s *StaticMemberSet) Join(nodes []*Node) error {
|
||||
s.nodes = nodes
|
||||
return nil
|
||||
}
|
||||
|
|
|
|||
76
cluster.go
76
cluster.go
|
|
@ -129,9 +129,9 @@ func (h ByHost) Less(i, j int) bool { return h[i].URI.String() < h[j].URI.String
|
|||
|
||||
// Cluster represents a collection of nodes.
|
||||
type Cluster struct {
|
||||
URI URI
|
||||
Nodes []*Node // TODO phase this out?
|
||||
NodeSet NodeSet
|
||||
URI URI
|
||||
Nodes []*Node // TODO phase this out?
|
||||
MemberSet MemberSet
|
||||
|
||||
// Hashing algorithm used to assign partitions to nodes.
|
||||
Hasher Hasher
|
||||
|
|
@ -198,12 +198,12 @@ func (c *Cluster) IsCoordinator() bool {
|
|||
return c.Coordinator == c.URI
|
||||
}
|
||||
|
||||
// AddHost adds a node to the Cluster and updates and saves the
|
||||
// AddNode adds a node to the Cluster and updates and saves the
|
||||
// new topology.
|
||||
func (c *Cluster) AddHost(uri URI) error {
|
||||
func (c *Cluster) AddNode(uri URI) error {
|
||||
|
||||
// add to cluster
|
||||
_, added := c.AddNode(uri)
|
||||
_, added := c.AddNodeBasicSorted(uri)
|
||||
if !added {
|
||||
return nil
|
||||
}
|
||||
|
|
@ -220,8 +220,8 @@ func (c *Cluster) AddHost(uri URI) error {
|
|||
return c.saveTopology()
|
||||
}
|
||||
|
||||
// URISet returns the list of uris in the cluster.
|
||||
func (c *Cluster) URISet() []URI {
|
||||
// NodeSet returns the list of uris in the cluster.
|
||||
func (c *Cluster) NodeSet() []URI {
|
||||
return Nodes(c.Nodes).URIs()
|
||||
}
|
||||
|
||||
|
|
@ -237,8 +237,8 @@ func (c *Cluster) setState(state string) {
|
|||
// Status returns the internal ClusterStatus representation.
|
||||
func (c *Cluster) Status() *internal.ClusterStatus {
|
||||
return &internal.ClusterStatus{
|
||||
State: c.State,
|
||||
URISet: encodeURIs(c.URISet()),
|
||||
State: c.State,
|
||||
NodeSet: encodeURIs(c.NodeSet()),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -252,9 +252,9 @@ func (c *Cluster) NodeByURI(uri URI) *Node {
|
|||
return nil
|
||||
}
|
||||
|
||||
// AddNode adds a node to the cluster, sorted by uri.
|
||||
// AddNodeBasicSorted adds a node to the cluster, sorted by uri.
|
||||
// Returns a pointer to the node and true if the node was added.
|
||||
func (c *Cluster) AddNode(uri URI) (*Node, bool) {
|
||||
func (c *Cluster) AddNodeBasicSorted(uri URI) (*Node, bool) {
|
||||
n := c.NodeByURI(uri)
|
||||
if n != nil {
|
||||
return n, false
|
||||
|
|
@ -513,11 +513,11 @@ func (c *Cluster) Open() error {
|
|||
return fmt.Errorf("considerTopology: %v", err)
|
||||
}
|
||||
// Add the local node to the cluster and update state.
|
||||
c.AddHost(c.URI)
|
||||
c.AddNode(c.URI)
|
||||
c.setState(state)
|
||||
} else {
|
||||
// Add the local node to the cluster.
|
||||
c.AddHost(c.URI)
|
||||
c.AddNode(c.URI)
|
||||
}
|
||||
|
||||
// Start the EventReceiver.
|
||||
|
|
@ -525,9 +525,9 @@ func (c *Cluster) Open() error {
|
|||
return fmt.Errorf("starting EventReceiver: %v", err)
|
||||
}
|
||||
|
||||
// Open NodeSet communication.
|
||||
if err := c.NodeSet.Open(); err != nil {
|
||||
return fmt.Errorf("opening NodeSet: %v", err)
|
||||
// Open MemberSet communication.
|
||||
if err := c.MemberSet.Open(); err != nil {
|
||||
return fmt.Errorf("opening MemberSet: %v", err)
|
||||
}
|
||||
|
||||
// Listen for cluster-resize events.
|
||||
|
|
@ -546,11 +546,11 @@ func (c *Cluster) Close() error {
|
|||
}
|
||||
|
||||
func (c *Cluster) needTopologyAgreement() bool {
|
||||
return c.State == NodeStateStarting && !URISlicesAreEqual(c.Topology.URISet, c.URISet())
|
||||
return c.State == NodeStateStarting && !URISlicesAreEqual(c.Topology.NodeSet, c.NodeSet())
|
||||
}
|
||||
|
||||
func (c *Cluster) haveTopologyAgreement() bool {
|
||||
return URISlicesAreEqual(c.Topology.URISet, c.URISet())
|
||||
return URISlicesAreEqual(c.Topology.NodeSet, c.NodeSet())
|
||||
}
|
||||
|
||||
func (c *Cluster) handleJoiningHost(uri URI) error {
|
||||
|
|
@ -571,7 +571,7 @@ func (c *Cluster) handleJoiningHost(uri URI) error {
|
|||
case ResizeJobStateDone:
|
||||
c.CompleteCurrentJob(ResizeJobStateDone)
|
||||
// Add uri to the cluster.
|
||||
return c.AddHost(uri)
|
||||
return c.AddNode(uri)
|
||||
case ResizeJobStateAborted:
|
||||
c.CompleteCurrentJob(ResizeJobStateAborted)
|
||||
}
|
||||
|
|
@ -662,7 +662,7 @@ func (c *Cluster) generateResizeJob(addURI URI) *ResizeJob {
|
|||
toCluster.Hasher = c.Hasher
|
||||
toCluster.PartitionN = c.PartitionN
|
||||
toCluster.ReplicaN = c.ReplicaN
|
||||
toCluster.AddNode(addURI)
|
||||
toCluster.AddNodeBasicSorted(addURI)
|
||||
|
||||
// Add to the ResizeJob the instructions for each index.
|
||||
for _, idx := range c.Holder.Indexes() {
|
||||
|
|
@ -922,9 +922,9 @@ func (j *ResizeJob) distributeResizeInstructions() error {
|
|||
return nil
|
||||
}
|
||||
|
||||
type URISet []URI
|
||||
type NodeSet []URI
|
||||
|
||||
func (u URISet) ToHostPortStrings() []string {
|
||||
func (u NodeSet) ToHostPortStrings() []string {
|
||||
other := make([]string, 0, len(u))
|
||||
for _, uri := range u {
|
||||
other = append(other, uri.HostPort())
|
||||
|
|
@ -934,8 +934,8 @@ func (u URISet) ToHostPortStrings() []string {
|
|||
|
||||
// Topology represents the list of hosts in the cluster.
|
||||
type Topology struct {
|
||||
mu sync.RWMutex
|
||||
URISet []URI
|
||||
mu sync.RWMutex
|
||||
NodeSet []URI
|
||||
}
|
||||
|
||||
func NewTopology() *Topology {
|
||||
|
|
@ -950,7 +950,7 @@ func (t *Topology) ContainsURI(uri URI) bool {
|
|||
}
|
||||
|
||||
func (t *Topology) containsURI(uri URI) bool {
|
||||
for _, turi := range t.URISet {
|
||||
for _, turi := range t.NodeSet {
|
||||
if turi == uri {
|
||||
return true
|
||||
}
|
||||
|
|
@ -958,14 +958,14 @@ func (t *Topology) containsURI(uri URI) bool {
|
|||
return false
|
||||
}
|
||||
|
||||
// AddHost adds the uri to the topology and returns true if added.
|
||||
// AddNode adds the uri to the topology and returns true if added.
|
||||
func (t *Topology) AddURI(uri URI) bool {
|
||||
t.mu.Lock()
|
||||
defer t.mu.Unlock()
|
||||
if t.containsURI(uri) {
|
||||
return false
|
||||
}
|
||||
t.URISet = append(t.URISet, uri)
|
||||
t.NodeSet = append(t.NodeSet, uri)
|
||||
return true
|
||||
}
|
||||
|
||||
|
|
@ -1007,7 +1007,7 @@ func encodeTopology(topology *Topology) *internal.Topology {
|
|||
return nil
|
||||
}
|
||||
return &internal.Topology{
|
||||
URISet: encodeURIs(topology.URISet),
|
||||
NodeSet: encodeURIs(topology.NodeSet),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1017,24 +1017,24 @@ func decodeTopology(topology *internal.Topology) (*Topology, error) {
|
|||
}
|
||||
|
||||
t := &Topology{
|
||||
URISet: decodeURIs(topology.URISet),
|
||||
NodeSet: decodeURIs(topology.NodeSet),
|
||||
}
|
||||
return t, nil
|
||||
}
|
||||
|
||||
func (c *Cluster) considerTopology() (string, error) {
|
||||
// If there is no .topology file, it's safe to go to state NORMAL.
|
||||
if len(c.Topology.URISet) == 0 {
|
||||
if len(c.Topology.NodeSet) == 0 {
|
||||
return NodeStateNormal, nil
|
||||
}
|
||||
|
||||
// The local node (coordinator) must be in the .topology.
|
||||
if !c.Topology.ContainsURI(c.Coordinator) {
|
||||
return "", fmt.Errorf("coordinator %s is not in topology: %v", c.Coordinator, c.Topology.URISet)
|
||||
return "", fmt.Errorf("coordinator %s is not in topology: %v", c.Coordinator, c.Topology.NodeSet)
|
||||
}
|
||||
|
||||
// If local node is the only thing in .topology, continue to state NORMAL.
|
||||
if len(c.Topology.URISet) == 1 {
|
||||
if len(c.Topology.NodeSet) == 1 {
|
||||
return NodeStateNormal, nil
|
||||
}
|
||||
|
||||
|
|
@ -1064,11 +1064,11 @@ func (c *Cluster) ReceiveEvent(e *NodeEvent) error {
|
|||
}
|
||||
|
||||
uri := e.URI
|
||||
if err := c.AddHost(uri); err != nil {
|
||||
if err := c.AddNode(uri); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
// If the result of the previous AddHost completed the joining of nodes
|
||||
// If the result of the previous AddNode completed the joining of nodes
|
||||
// in the topology, then change the state to NORMAL.
|
||||
if c.haveTopologyAgreement() {
|
||||
return c.setStateAndBroadcast(NodeStateNormal)
|
||||
|
|
@ -1085,7 +1085,7 @@ func (c *Cluster) ReceiveEvent(e *NodeEvent) error {
|
|||
// If the index does not yet have data, go ahead and add the node.
|
||||
if !c.Holder.HasData() {
|
||||
uri := e.URI
|
||||
if err := c.AddHost(uri); err != nil {
|
||||
if err := c.AddNode(uri); err != nil {
|
||||
return err
|
||||
}
|
||||
return c.setStateAndBroadcast(NodeStateNormal)
|
||||
|
|
@ -1113,8 +1113,8 @@ func (c *Cluster) mergeClusterStatus(cs *internal.ClusterStatus) error {
|
|||
return nil
|
||||
}
|
||||
|
||||
for _, uri := range decodeURIs(cs.URISet) {
|
||||
c.AddHost(uri)
|
||||
for _, uri := range decodeURIs(cs.NodeSet) {
|
||||
c.AddNode(uri)
|
||||
}
|
||||
c.setState(cs.State)
|
||||
|
||||
|
|
|
|||
|
|
@ -31,8 +31,8 @@ func TestFragCombos(t *testing.T) {
|
|||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
c.AddNode(*uri0)
|
||||
c.AddNode(*uri1)
|
||||
c.AddNodeBasicSorted(*uri0)
|
||||
c.AddNodeBasicSorted(*uri1)
|
||||
|
||||
tests := []struct {
|
||||
idx string
|
||||
|
|
|
|||
|
|
@ -114,7 +114,7 @@ func TestCluster_Nodes(t *testing.T) {
|
|||
{URI: uri2},
|
||||
}
|
||||
|
||||
t.Run("URISet", func(t *testing.T) {
|
||||
t.Run("NodeSet", func(t *testing.T) {
|
||||
actual := pilosa.Nodes(nodes).URIs()
|
||||
expected := []pilosa.URI{uri0, uri1, uri2}
|
||||
if !reflect.DeepEqual(actual, expected) {
|
||||
|
|
@ -198,17 +198,17 @@ func TestCluster_Topology(t *testing.T) {
|
|||
base := test.NewURIFromHostPort("host0", 0)
|
||||
invalid := test.NewURIFromHostPort("invalid", 0)
|
||||
|
||||
t.Run("AddHost", func(t *testing.T) {
|
||||
err := c1.AddHost(uri1)
|
||||
t.Run("AddNode", func(t *testing.T) {
|
||||
err := c1.AddNode(uri1)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
// add the same host.
|
||||
err = c1.AddHost(uri1)
|
||||
err = c1.AddNode(uri1)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
err = c1.AddHost(uri2)
|
||||
err = c1.AddNode(uri2)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -28,10 +28,10 @@ import (
|
|||
"github.com/pilosa/pilosa/internal"
|
||||
)
|
||||
|
||||
// GossipNodeSet represents a gossip implementation of NodeSet using memberlist
|
||||
// GossipNodeSet also represents a gossip implementation of pilosa.Broadcaster
|
||||
// GossipNodeSet also represents an implementation of memberlist.Delegate
|
||||
type GossipNodeSet struct {
|
||||
// GossipMemberSet represents a gossip implementation of MemberSet using memberlist
|
||||
// GossipMemberSet also represents a gossip implementation of pilosa.Broadcaster
|
||||
// GossipMemberSet also represents an implementation of memberlist.Delegate
|
||||
type GossipMemberSet struct {
|
||||
memberlist *memberlist.Memberlist
|
||||
handler pilosa.BroadcastHandler
|
||||
|
||||
|
|
@ -44,8 +44,8 @@ type GossipNodeSet struct {
|
|||
LogOutput io.Writer
|
||||
}
|
||||
|
||||
// Nodes implements the NodeSet interface and returns a list of nodes in the cluster.
|
||||
func (g *GossipNodeSet) Nodes() []*pilosa.Node {
|
||||
// Nodes implements the MemberSet interface and returns a list of nodes in the cluster.
|
||||
func (g *GossipMemberSet) Nodes() []*pilosa.Node {
|
||||
a := make([]*pilosa.Node, 0, g.memberlist.NumMembers())
|
||||
for _, n := range g.memberlist.Members() {
|
||||
uri, _ := pilosa.NewURIFromAddress(n.Name)
|
||||
|
|
@ -56,15 +56,15 @@ func (g *GossipNodeSet) Nodes() []*pilosa.Node {
|
|||
}
|
||||
|
||||
// Start implements the BroadcastReceiver interface and sets the BroadcastHandler.
|
||||
func (g *GossipNodeSet) Start(h pilosa.BroadcastHandler) error {
|
||||
func (g *GossipMemberSet) Start(h pilosa.BroadcastHandler) error {
|
||||
g.handler = h
|
||||
return nil
|
||||
}
|
||||
|
||||
// Open implements the NodeSet interface to start network activity.
|
||||
func (g *GossipNodeSet) Open() error {
|
||||
// Open implements the MemberSet interface to start network activity.
|
||||
func (g *GossipMemberSet) Open() error {
|
||||
if g.handler == nil {
|
||||
return fmt.Errorf("opening GossipNodeSet: you must call Start(pilosa.BroadcastHandler) before calling Open()")
|
||||
return fmt.Errorf("opening GossipMemberSet: you must call Start(pilosa.BroadcastHandler) before calling Open()")
|
||||
}
|
||||
|
||||
err := error(nil)
|
||||
|
|
@ -88,7 +88,7 @@ func (g *GossipNodeSet) Open() error {
|
|||
// attach to gossip seed node
|
||||
nodes := []*pilosa.Node{&pilosa.Node{URI: *uri}} //TODO: support a list of seeds
|
||||
|
||||
err = g.joinWithRetry(pilosa.URISet(pilosa.Nodes(nodes).URIs()).ToHostPortStrings())
|
||||
err = g.joinWithRetry(pilosa.NodeSet(pilosa.Nodes(nodes).URIs()).ToHostPortStrings())
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
@ -96,7 +96,7 @@ func (g *GossipNodeSet) Open() error {
|
|||
}
|
||||
|
||||
// joinWithRetry wraps the standard memberlist Join function in a retry.
|
||||
func (g *GossipNodeSet) joinWithRetry(hosts []string) error {
|
||||
func (g *GossipMemberSet) joinWithRetry(hosts []string) error {
|
||||
err := retry(60, 2*time.Second, func() error {
|
||||
_, err := g.memberlist.Join(hosts)
|
||||
return err
|
||||
|
|
@ -120,8 +120,8 @@ func retry(attempts int, sleep time.Duration, fn func() error) (err error) {
|
|||
return fmt.Errorf("after %d attempts, last error: %s", attempts, err)
|
||||
}
|
||||
|
||||
// logger returns a logger for the GossipNodeSet.
|
||||
func (g *GossipNodeSet) logger() *log.Logger {
|
||||
// logger returns a logger for the GossipMemberSet.
|
||||
func (g *GossipMemberSet) logger() *log.Logger {
|
||||
return log.New(g.LogOutput, "", log.LstdFlags)
|
||||
}
|
||||
|
||||
|
|
@ -132,9 +132,9 @@ type gossipConfig struct {
|
|||
memberlistConfig *memberlist.Config
|
||||
}
|
||||
|
||||
// NewGossipNodeSet returns a new instance of GossipNodeSet.
|
||||
func NewGossipNodeSet(name string, gossipHost string, gossipPort int, gossipSeed string, server *pilosa.Server, secretKey []byte) *GossipNodeSet {
|
||||
g := &GossipNodeSet{
|
||||
// NewGossipMemberSet returns a new instance of GossipMemberSet.
|
||||
func NewGossipMemberSet(name string, gossipHost string, gossipPort int, gossipSeed string, server *pilosa.Server, secretKey []byte) *GossipMemberSet {
|
||||
g := &GossipMemberSet{
|
||||
LogOutput: server.LogOutput,
|
||||
}
|
||||
|
||||
|
|
@ -159,7 +159,7 @@ func NewGossipNodeSet(name string, gossipHost string, gossipPort int, gossipSeed
|
|||
}
|
||||
|
||||
// SendSync implementation of the Broadcaster interface.
|
||||
func (g *GossipNodeSet) SendSync(pb proto.Message) error {
|
||||
func (g *GossipMemberSet) SendSync(pb proto.Message) error {
|
||||
msg, err := pilosa.MarshalMessage(pb)
|
||||
if err != nil {
|
||||
return err
|
||||
|
|
@ -187,7 +187,7 @@ func (g *GossipNodeSet) SendSync(pb proto.Message) error {
|
|||
}
|
||||
|
||||
// SendAsync implementation of the Broadcaster interface.
|
||||
func (g *GossipNodeSet) SendAsync(pb proto.Message) error {
|
||||
func (g *GossipMemberSet) SendAsync(pb proto.Message) error {
|
||||
msg, err := pilosa.MarshalMessage(pb)
|
||||
if err != nil {
|
||||
return err
|
||||
|
|
@ -202,7 +202,7 @@ func (g *GossipNodeSet) SendAsync(pb proto.Message) error {
|
|||
}
|
||||
|
||||
// SendTo implementation of the Broadcaster interface.
|
||||
func (g *GossipNodeSet) SendTo(to *pilosa.Node, pb proto.Message) error {
|
||||
func (g *GossipMemberSet) SendTo(to *pilosa.Node, pb proto.Message) error {
|
||||
msg, err := pilosa.MarshalMessage(pb)
|
||||
if err != nil {
|
||||
return err
|
||||
|
|
@ -221,13 +221,13 @@ func (g *GossipNodeSet) SendTo(to *pilosa.Node, pb proto.Message) error {
|
|||
}
|
||||
|
||||
// NodeMeta implementation of the memberlist.Delegate interface.
|
||||
func (g *GossipNodeSet) NodeMeta(limit int) []byte {
|
||||
func (g *GossipMemberSet) NodeMeta(limit int) []byte {
|
||||
return []byte{}
|
||||
}
|
||||
|
||||
// NotifyMsg implementation of the memberlist.Delegate interface
|
||||
// called when a user-data message is received.
|
||||
func (g *GossipNodeSet) NotifyMsg(b []byte) {
|
||||
func (g *GossipMemberSet) NotifyMsg(b []byte) {
|
||||
m, err := pilosa.UnmarshalMessage(b)
|
||||
if err != nil {
|
||||
g.logger().Printf("unmarshal message error: %s", err)
|
||||
|
|
@ -241,13 +241,13 @@ func (g *GossipNodeSet) NotifyMsg(b []byte) {
|
|||
|
||||
// GetBroadcasts implementation of the memberlist.Delegate interface
|
||||
// called when user data messages can be broadcast.
|
||||
func (g *GossipNodeSet) GetBroadcasts(overhead, limit int) [][]byte {
|
||||
func (g *GossipMemberSet) GetBroadcasts(overhead, limit int) [][]byte {
|
||||
return g.broadcasts.GetBroadcasts(overhead, limit)
|
||||
}
|
||||
|
||||
// LocalState implementation of the memberlist.Delegate interface
|
||||
// sends this Node's state data.
|
||||
func (g *GossipNodeSet) LocalState(join bool) []byte {
|
||||
func (g *GossipMemberSet) LocalState(join bool) []byte {
|
||||
pb, err := g.statusHandler.LocalStatus()
|
||||
if err != nil {
|
||||
g.logger().Printf("error getting local state, err=%s", err)
|
||||
|
|
@ -265,7 +265,7 @@ func (g *GossipNodeSet) LocalState(join bool) []byte {
|
|||
|
||||
// MergeRemoteState implementation of the memberlist.Delegate interface
|
||||
// receive and process the remote side's LocalState.
|
||||
func (g *GossipNodeSet) MergeRemoteState(buf []byte, join bool) {
|
||||
func (g *GossipMemberSet) MergeRemoteState(buf []byte, join bool) {
|
||||
// Unmarshal nodestate data.
|
||||
var pb internal.NodeStatus
|
||||
if err := proto.Unmarshal(buf, &pb); err != nil {
|
||||
|
|
|
|||
|
|
@ -224,8 +224,8 @@ func (h *Handler) handleGetStatus(w http.ResponseWriter, r *http.Request) {
|
|||
|
||||
cs := pb.(*internal.ClusterStatus)
|
||||
if err := json.NewEncoder(w).Encode(getStatusResponse{
|
||||
State: cs.State,
|
||||
URISet: decodeURIs(cs.URISet),
|
||||
State: cs.State,
|
||||
NodeSet: decodeURIs(cs.NodeSet),
|
||||
}); err != nil {
|
||||
h.logger().Printf("write status response error: %s", err)
|
||||
}
|
||||
|
|
@ -236,8 +236,8 @@ type getSchemaResponse struct {
|
|||
}
|
||||
|
||||
type getStatusResponse struct {
|
||||
State string `json:"state"`
|
||||
URISet []URI `json:"uri-set"`
|
||||
State string `json:"state"`
|
||||
NodeSet []URI `json:"nodes"`
|
||||
}
|
||||
|
||||
// handlePostQuery handles /query requests.
|
||||
|
|
|
|||
|
|
@ -147,7 +147,7 @@ func TestHandler_Status(t *testing.T) {
|
|||
h.ServeHTTP(w, test.MustNewHTTPRequest("GET", "/status", nil))
|
||||
if w.Code != http.StatusOK {
|
||||
t.Fatalf("unexpected status code: %d", w.Code)
|
||||
} else if body := w.Body.String(); body != `{"state":"NORMAL","uri-set":[{"scheme":"http","host":"localhost","port":10101}]}`+"\n" {
|
||||
} else if body := w.Body.String(); body != `{"state":"NORMAL","nodes":[{"scheme":"http","host":"localhost","port":10101}]}`+"\n" {
|
||||
t.Fatalf("unexpected body: %s", body)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -702,8 +702,8 @@ func (m *NodeStatus) GetSchema() *Schema {
|
|||
}
|
||||
|
||||
type ClusterStatus struct {
|
||||
State string `protobuf:"bytes,1,opt,name=State,proto3" json:"State,omitempty"`
|
||||
URISet []*URI `protobuf:"bytes,2,rep,name=URISet" json:"URISet,omitempty"`
|
||||
State string `protobuf:"bytes,1,opt,name=State,proto3" json:"State,omitempty"`
|
||||
NodeSet []*URI `protobuf:"bytes,2,rep,name=NodeSet" json:"NodeSet,omitempty"`
|
||||
}
|
||||
|
||||
func (m *ClusterStatus) Reset() { *m = ClusterStatus{} }
|
||||
|
|
@ -718,9 +718,9 @@ func (m *ClusterStatus) GetState() string {
|
|||
return ""
|
||||
}
|
||||
|
||||
func (m *ClusterStatus) GetURISet() []*URI {
|
||||
func (m *ClusterStatus) GetNodeSet() []*URI {
|
||||
if m != nil {
|
||||
return m.URISet
|
||||
return m.NodeSet
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
|
@ -920,7 +920,7 @@ func (m *ResizeInstructionComplete) GetError() string {
|
|||
}
|
||||
|
||||
type Topology struct {
|
||||
URISet []*URI `protobuf:"bytes,1,rep,name=URISet" json:"URISet,omitempty"`
|
||||
NodeSet []*URI `protobuf:"bytes,1,rep,name=NodeSet" json:"NodeSet,omitempty"`
|
||||
}
|
||||
|
||||
func (m *Topology) Reset() { *m = Topology{} }
|
||||
|
|
@ -928,9 +928,9 @@ func (m *Topology) String() string { return proto.CompactTextString(m
|
|||
func (*Topology) ProtoMessage() {}
|
||||
func (*Topology) Descriptor() ([]byte, []int) { return fileDescriptorPrivate, []int{28} }
|
||||
|
||||
func (m *Topology) GetURISet() []*URI {
|
||||
func (m *Topology) GetNodeSet() []*URI {
|
||||
if m != nil {
|
||||
return m.URISet
|
||||
return m.NodeSet
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
|
@ -1883,8 +1883,8 @@ func (m *ClusterStatus) MarshalTo(dAtA []byte) (int, error) {
|
|||
i = encodeVarintPrivate(dAtA, i, uint64(len(m.State)))
|
||||
i += copy(dAtA[i:], m.State)
|
||||
}
|
||||
if len(m.URISet) > 0 {
|
||||
for _, msg := range m.URISet {
|
||||
if len(m.NodeSet) > 0 {
|
||||
for _, msg := range m.NodeSet {
|
||||
dAtA[i] = 0x12
|
||||
i++
|
||||
i = encodeVarintPrivate(dAtA, i, uint64(msg.Size()))
|
||||
|
|
@ -2134,8 +2134,8 @@ func (m *Topology) MarshalTo(dAtA []byte) (int, error) {
|
|||
_ = i
|
||||
var l int
|
||||
_ = l
|
||||
if len(m.URISet) > 0 {
|
||||
for _, msg := range m.URISet {
|
||||
if len(m.NodeSet) > 0 {
|
||||
for _, msg := range m.NodeSet {
|
||||
dAtA[i] = 0xa
|
||||
i++
|
||||
i = encodeVarintPrivate(dAtA, i, uint64(msg.Size()))
|
||||
|
|
@ -2556,8 +2556,8 @@ func (m *ClusterStatus) Size() (n int) {
|
|||
if l > 0 {
|
||||
n += 1 + l + sovPrivate(uint64(l))
|
||||
}
|
||||
if len(m.URISet) > 0 {
|
||||
for _, e := range m.URISet {
|
||||
if len(m.NodeSet) > 0 {
|
||||
for _, e := range m.NodeSet {
|
||||
l = e.Size()
|
||||
n += 1 + l + sovPrivate(uint64(l))
|
||||
}
|
||||
|
|
@ -2671,8 +2671,8 @@ func (m *ResizeInstructionComplete) Size() (n int) {
|
|||
func (m *Topology) Size() (n int) {
|
||||
var l int
|
||||
_ = l
|
||||
if len(m.URISet) > 0 {
|
||||
for _, e := range m.URISet {
|
||||
if len(m.NodeSet) > 0 {
|
||||
for _, e := range m.NodeSet {
|
||||
l = e.Size()
|
||||
n += 1 + l + sovPrivate(uint64(l))
|
||||
}
|
||||
|
|
@ -5814,7 +5814,7 @@ func (m *ClusterStatus) Unmarshal(dAtA []byte) error {
|
|||
iNdEx = postIndex
|
||||
case 2:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field URISet", wireType)
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field NodeSet", wireType)
|
||||
}
|
||||
var msglen int
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
|
|
@ -5838,8 +5838,8 @@ func (m *ClusterStatus) Unmarshal(dAtA []byte) error {
|
|||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
m.URISet = append(m.URISet, &URI{})
|
||||
if err := m.URISet[len(m.URISet)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
||||
m.NodeSet = append(m.NodeSet, &URI{})
|
||||
if err := m.NodeSet[len(m.NodeSet)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
||||
return err
|
||||
}
|
||||
iNdEx = postIndex
|
||||
|
|
@ -6664,7 +6664,7 @@ func (m *Topology) Unmarshal(dAtA []byte) error {
|
|||
switch fieldNum {
|
||||
case 1:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field URISet", wireType)
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field NodeSet", wireType)
|
||||
}
|
||||
var msglen int
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
|
|
@ -6688,8 +6688,8 @@ func (m *Topology) Unmarshal(dAtA []byte) error {
|
|||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
m.URISet = append(m.URISet, &URI{})
|
||||
if err := m.URISet[len(m.URISet)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
||||
m.NodeSet = append(m.NodeSet, &URI{})
|
||||
if err := m.NodeSet[len(m.NodeSet)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
||||
return err
|
||||
}
|
||||
iNdEx = postIndex
|
||||
|
|
@ -6822,77 +6822,77 @@ var (
|
|||
func init() { proto.RegisterFile("private.proto", fileDescriptorPrivate) }
|
||||
|
||||
var fileDescriptorPrivate = []byte{
|
||||
// 1147 bytes of a gzipped FileDescriptorProto
|
||||
// 1144 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x57, 0xcd, 0x6e, 0x23, 0x45,
|
||||
0x10, 0x66, 0x3c, 0xb6, 0xd7, 0x2e, 0xc7, 0x1b, 0xa7, 0x09, 0x91, 0x13, 0x45, 0x5e, 0xd3, 0x12,
|
||||
0x6c, 0x58, 0x89, 0xc0, 0x66, 0x25, 0x04, 0x41, 0x48, 0xb0, 0xb1, 0x57, 0x3b, 0xb0, 0x59, 0x96,
|
||||
0x76, 0xb2, 0x48, 0x1c, 0x90, 0x3a, 0x76, 0x93, 0x8c, 0x62, 0xcf, 0x98, 0x9e, 0x76, 0x12, 0xef,
|
||||
0x81, 0x1b, 0x1c, 0xe0, 0x05, 0xb8, 0x73, 0xe6, 0x3d, 0x38, 0xf2, 0x08, 0x28, 0x3c, 0x04, 0x12,
|
||||
0x17, 0x50, 0xd7, 0x74, 0xcf, 0x8c, 0xff, 0x12, 0x25, 0xb7, 0xa9, 0xea, 0xaa, 0xea, 0xaf, 0xbf,
|
||||
0xfa, 0xe9, 0x1e, 0xa8, 0x0e, 0xa5, 0x7f, 0xc6, 0x95, 0xd8, 0x1e, 0xca, 0x50, 0x85, 0xa4, 0xe4,
|
||||
0x07, 0x4a, 0xc8, 0x80, 0xf7, 0xe9, 0x97, 0x50, 0xf6, 0x82, 0x9e, 0xb8, 0xd8, 0x17, 0x8a, 0x93,
|
||||
0x26, 0x54, 0xf6, 0xc2, 0xfe, 0x68, 0x10, 0x3c, 0xe3, 0x47, 0xa2, 0x5f, 0x77, 0x9a, 0xce, 0x56,
|
||||
0x99, 0x65, 0x55, 0xda, 0xe2, 0xc0, 0x1f, 0x88, 0xaf, 0x46, 0x3c, 0x50, 0xa3, 0x41, 0x3d, 0x17,
|
||||
0x5b, 0x64, 0x54, 0xf4, 0x5f, 0x07, 0xca, 0x4f, 0x24, 0x1f, 0x08, 0x8c, 0xb8, 0x01, 0x25, 0x16,
|
||||
0x9e, 0x67, 0xc3, 0x25, 0x32, 0x79, 0x1b, 0xee, 0x7a, 0xc1, 0x99, 0x90, 0x91, 0x68, 0x07, 0xfc,
|
||||
0xa8, 0x2f, 0x7a, 0x18, 0xae, 0xc4, 0xa6, 0xb4, 0x64, 0x13, 0xca, 0x7b, 0xbc, 0x7b, 0x22, 0x0e,
|
||||
0xc6, 0x43, 0x51, 0x77, 0x31, 0x48, 0xaa, 0x48, 0x56, 0x3b, 0xfe, 0x2b, 0x51, 0xcf, 0x37, 0x9d,
|
||||
0xad, 0x2a, 0x4b, 0x15, 0xd3, 0x78, 0x0b, 0x33, 0x78, 0x09, 0x85, 0x25, 0xc6, 0x83, 0xe3, 0x04,
|
||||
0x43, 0x11, 0x31, 0x4c, 0xe8, 0xc8, 0x7d, 0x28, 0x3e, 0xf1, 0x45, 0xbf, 0x17, 0xd5, 0xef, 0x34,
|
||||
0xdd, 0xad, 0xca, 0xce, 0xf2, 0xb6, 0xe5, 0x6f, 0x1b, 0xf5, 0xcc, 0x2c, 0x53, 0x0a, 0x77, 0xbd,
|
||||
0xc1, 0x30, 0x94, 0x8a, 0x89, 0x68, 0x18, 0x06, 0x91, 0x20, 0x35, 0x70, 0xdb, 0x52, 0x9a, 0xb3,
|
||||
0xeb, 0x4f, 0xfa, 0x03, 0xd4, 0x1e, 0xf7, 0xc3, 0xee, 0x69, 0x8b, 0x2b, 0xce, 0xc4, 0xf7, 0x23,
|
||||
0x11, 0x29, 0xb2, 0x0a, 0x05, 0xcc, 0x82, 0xb1, 0x8b, 0x05, 0xad, 0x45, 0x26, 0x0d, 0xcd, 0xb1,
|
||||
0xa0, 0xb5, 0xe8, 0x8f, 0x54, 0xe4, 0x59, 0x2c, 0x68, 0x6d, 0xa7, 0xef, 0x77, 0x63, 0x0a, 0xf2,
|
||||
0x2c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x76, 0x93, 0xf1, 0xbc, 0x96, 0x1a, 0xc7, 0xa8,
|
||||
0xe2, 0x65, 0x66, 0xcd, 0xe8, 0x8f, 0x0e, 0x2c, 0x65, 0x57, 0xae, 0x2f, 0x9b, 0x84, 0xa1, 0xdc,
|
||||
0x5c, 0x86, 0xdc, 0x79, 0x0c, 0xe5, 0x53, 0x86, 0xd2, 0x27, 0x45, 0x21, 0xf3, 0xa4, 0xa0, 0x27,
|
||||
0xb0, 0x3e, 0x43, 0xdb, 0x5e, 0x38, 0x18, 0xea, 0xfc, 0xdc, 0x96, 0xbe, 0x55, 0x28, 0xb4, 0xa5,
|
||||
0x34, 0xc4, 0x95, 0x59, 0x2c, 0xd0, 0x87, 0x50, 0x3a, 0x08, 0x87, 0x61, 0x3f, 0x3c, 0x1e, 0x67,
|
||||
0xca, 0xcf, 0xb9, 0xa2, 0xfc, 0x1e, 0xd7, 0xfe, 0xb8, 0x6c, 0x38, 0x7f, 0x5e, 0x36, 0x9c, 0xbf,
|
||||
0x2e, 0x1b, 0xce, 0xaf, 0x7f, 0x37, 0x5e, 0x3b, 0x2a, 0xe2, 0xef, 0xca, 0xa3, 0xff, 0x03, 0x00,
|
||||
0x00, 0xff, 0xff, 0x64, 0x17, 0xa4, 0x6c, 0xbf, 0x0c, 0x00, 0x00,
|
||||
0x10, 0x66, 0x3c, 0xb6, 0x63, 0x97, 0xe3, 0x8d, 0xd3, 0x84, 0xc8, 0x89, 0x22, 0xaf, 0xe9, 0x03,
|
||||
0x09, 0x2b, 0x11, 0x20, 0x91, 0x10, 0x04, 0x21, 0xc1, 0xc6, 0x5e, 0xed, 0x00, 0x09, 0x4b, 0x3b,
|
||||
0xbb, 0x48, 0x1c, 0x90, 0x3a, 0x76, 0x93, 0x8c, 0x32, 0x9e, 0x31, 0x33, 0xed, 0x24, 0xde, 0x03,
|
||||
0x37, 0x38, 0xc0, 0x0b, 0x70, 0xe7, 0xcc, 0x7b, 0x70, 0xe4, 0x11, 0x50, 0x78, 0x08, 0x24, 0x2e,
|
||||
0xac, 0xba, 0xa6, 0x7b, 0x66, 0xfc, 0x17, 0x2b, 0xb9, 0x4d, 0x55, 0x57, 0x55, 0x7f, 0xfd, 0xd5,
|
||||
0x4f, 0xf7, 0x40, 0x75, 0x10, 0xba, 0x97, 0x5c, 0x8a, 0xdd, 0x41, 0x18, 0xc8, 0x80, 0x94, 0x5c,
|
||||
0x5f, 0x8a, 0xd0, 0xe7, 0x1e, 0xfd, 0x0a, 0xca, 0x8e, 0xdf, 0x13, 0xd7, 0x47, 0x42, 0x72, 0xd2,
|
||||
0x84, 0xca, 0x61, 0xe0, 0x0d, 0xfb, 0xfe, 0x97, 0xfc, 0x54, 0x78, 0x75, 0xab, 0x69, 0xed, 0x94,
|
||||
0x59, 0x56, 0xa5, 0x2c, 0x4e, 0xdc, 0xbe, 0xf8, 0x7a, 0xc8, 0x7d, 0x39, 0xec, 0xd7, 0x73, 0xb1,
|
||||
0x45, 0x46, 0x45, 0xff, 0xb3, 0xa0, 0xfc, 0x24, 0xe4, 0x7d, 0x81, 0x11, 0x37, 0xa1, 0xc4, 0x82,
|
||||
0xab, 0x6c, 0xb8, 0x44, 0x26, 0x6f, 0xc1, 0x03, 0xc7, 0xbf, 0x14, 0x61, 0x24, 0xda, 0x3e, 0x3f,
|
||||
0xf5, 0x44, 0x0f, 0xc3, 0x95, 0xd8, 0x84, 0x96, 0x6c, 0x41, 0xf9, 0x90, 0x77, 0xcf, 0xc5, 0xc9,
|
||||
0x68, 0x20, 0xea, 0x36, 0x06, 0x49, 0x15, 0xc9, 0x6a, 0xc7, 0x7d, 0x29, 0xea, 0xf9, 0xa6, 0xb5,
|
||||
0x53, 0x65, 0xa9, 0x62, 0x12, 0x6f, 0x61, 0x0a, 0x2f, 0xa1, 0xb0, 0xcc, 0xb8, 0x7f, 0x96, 0x60,
|
||||
0x28, 0x22, 0x86, 0x31, 0x1d, 0xd9, 0x86, 0xe2, 0x13, 0x57, 0x78, 0xbd, 0xa8, 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, 0xc1, 0x39, 0x6e, 0x2e, 0x05, 0x14, 0xd4, 0x44, 0x1c,
|
||||
0x73, 0xb8, 0xd3, 0x54, 0x0b, 0x60, 0xcb, 0x4c, 0x92, 0x31, 0x24, 0xb7, 0xf7, 0xe4, 0x47, 0x00,
|
||||
0xa9, 0xa9, 0x6e, 0xf7, 0x5b, 0xea, 0x33, 0x63, 0x4c, 0x9f, 0xc2, 0x96, 0x19, 0x73, 0x77, 0xd8,
|
||||
0xd0, 0x54, 0x4b, 0x2e, 0xad, 0x16, 0xda, 0x06, 0xfb, 0x39, 0x73, 0xd4, 0x55, 0x87, 0xdd, 0x6a,
|
||||
0x52, 0xa4, 0x25, 0xe5, 0xf2, 0x34, 0x88, 0xa4, 0x71, 0x51, 0xdf, 0x4a, 0xf7, 0x2c, 0x08, 0x25,
|
||||
0x22, 0xae, 0x32, 0xfc, 0xa6, 0xbf, 0x58, 0x00, 0xc7, 0x41, 0x4f, 0x74, 0x24, 0x97, 0xc3, 0x88,
|
||||
0x3c, 0xc4, 0xa8, 0x18, 0xab, 0xb2, 0x57, 0x4d, 0xcf, 0xf4, 0x9c, 0x39, 0x0c, 0xf7, 0x7b, 0x3f,
|
||||
0x73, 0x11, 0x4e, 0x4f, 0x98, 0x64, 0x89, 0x65, 0xae, 0xcb, 0x1d, 0x33, 0x50, 0x34, 0x55, 0xb5,
|
||||
0xd4, 0x3e, 0xd6, 0x6b, 0xd0, 0x9c, 0x1e, 0x43, 0xf5, 0xd0, 0x1b, 0x46, 0x52, 0x84, 0x1a, 0x8e,
|
||||
0xba, 0x49, 0x24, 0x97, 0x49, 0xfd, 0xa1, 0x40, 0xb6, 0x61, 0x09, 0x21, 0x0b, 0xa9, 0xfb, 0x76,
|
||||
0x02, 0xa8, 0x59, 0xa5, 0x1d, 0x28, 0xcc, 0x6f, 0x37, 0x02, 0x79, 0x7c, 0x83, 0x69, 0x86, 0xf0,
|
||||
0xf9, 0x55, 0x03, 0xfb, 0xc8, 0x8d, 0x53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 0xb5, 0xd3, 0x22, 0xfe, 0xb2, 0xec, 0xbf, 0x0a, 0x00, 0x00, 0xff, 0xff,
|
||||
0x18, 0x9c, 0xa1, 0x75, 0xc3, 0x0c, 0x00, 0x00,
|
||||
}
|
||||
|
|
|
|||
|
|
@ -129,7 +129,7 @@ message NodeStatus {
|
|||
|
||||
message ClusterStatus {
|
||||
string State = 1;
|
||||
repeated URI URISet = 2;
|
||||
repeated URI NodeSet = 2;
|
||||
}
|
||||
|
||||
message Field {
|
||||
|
|
@ -167,6 +167,6 @@ message ResizeInstructionComplete {
|
|||
}
|
||||
|
||||
message Topology {
|
||||
repeated URI URISet = 1;
|
||||
repeated URI NodeSet = 1;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -380,7 +380,7 @@ func (s *Server) LocalStatus() (proto.Message, error) {
|
|||
return &ns, nil
|
||||
}
|
||||
|
||||
// ClusterStatus returns the ClusterState and URISet for the cluster.
|
||||
// ClusterStatus returns the ClusterState and NodeSet for the cluster.
|
||||
func (s *Server) ClusterStatus() (proto.Message, error) {
|
||||
return s.Cluster.Status(), nil
|
||||
}
|
||||
|
|
@ -525,7 +525,7 @@ func CountOpenFiles() int {
|
|||
}
|
||||
|
||||
// StatusHandler specifies the methods which an object must implement to share
|
||||
// state in the cluster. These are used by the GossipNodeSet to implement the
|
||||
// state in the cluster. These are used by the GossipMemberSet to implement the
|
||||
// LocalState and MergeRemoteState methods of memberlist.Delegate
|
||||
type StatusHandler interface {
|
||||
LocalStatus() (proto.Message, error)
|
||||
|
|
|
|||
|
|
@ -209,15 +209,15 @@ func (m *Command) SetupServer() error {
|
|||
// get the host portion of addr to use for binding
|
||||
gossipHost := uri.Host()
|
||||
m.Server.Cluster.EventReceiver = gossip.NewGossipEventReceiver()
|
||||
gossipNodeSet := gossip.NewGossipNodeSet(uri.String(), gossipHost, gossipPort, gossipSeed, m.Server, gossipKey)
|
||||
m.Server.Cluster.NodeSet = gossipNodeSet
|
||||
m.Server.Broadcaster = gossipNodeSet
|
||||
m.Server.BroadcastReceiver = gossipNodeSet
|
||||
gossipMemberSet := gossip.NewGossipMemberSet(uri.String(), gossipHost, gossipPort, gossipSeed, m.Server, gossipKey)
|
||||
m.Server.Cluster.MemberSet = gossipMemberSet
|
||||
m.Server.Broadcaster = gossipMemberSet
|
||||
m.Server.BroadcastReceiver = gossipMemberSet
|
||||
case pilosa.ClusterStatic, pilosa.ClusterNone:
|
||||
m.Server.Broadcaster = pilosa.NopBroadcaster
|
||||
m.Server.Cluster.NodeSet = pilosa.NewStaticNodeSet()
|
||||
m.Server.Cluster.MemberSet = pilosa.NewStaticMemberSet()
|
||||
m.Server.BroadcastReceiver = pilosa.NopBroadcastReceiver
|
||||
err := m.Server.Cluster.NodeSet.(*pilosa.StaticNodeSet).Join(m.Server.Cluster.Nodes)
|
||||
err := m.Server.Cluster.MemberSet.(*pilosa.StaticMemberSet).Join(m.Server.Cluster.Nodes)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
|
|||
|
|
@ -445,18 +445,18 @@ func TestMain_SendReceiveMessage(t *testing.T) {
|
|||
}
|
||||
gossipSeed := gossipHost + ":" + freePorts[0]
|
||||
|
||||
topology := &pilosa.Topology{URISet: []pilosa.URI{m0.Server.URI, m1.Server.URI}}
|
||||
topology := &pilosa.Topology{NodeSet: []pilosa.URI{m0.Server.URI, m1.Server.URI}}
|
||||
|
||||
m0.Server.Cluster.Coordinator = m0.Server.URI
|
||||
m0.Server.Cluster.Topology = topology
|
||||
m0.Server.Cluster.EventReceiver = gossip.NewGossipEventReceiver()
|
||||
|
||||
gossipNodeSet0 := gossip.NewGossipNodeSet(m0.Server.URI.HostPort(), gossipHost, gossipPort, gossipSeed, m0.Server, nil)
|
||||
m0.Server.Cluster.NodeSet = gossipNodeSet0
|
||||
m0.Server.Broadcaster = gossipNodeSet0
|
||||
gossipMemberSet0 := gossip.NewGossipMemberSet(m0.Server.URI.HostPort(), gossipHost, gossipPort, gossipSeed, m0.Server, nil)
|
||||
m0.Server.Cluster.MemberSet = gossipMemberSet0
|
||||
m0.Server.Broadcaster = gossipMemberSet0
|
||||
m0.Server.Handler.Broadcaster = m0.Server.Broadcaster
|
||||
m0.Server.Holder.Broadcaster = m0.Server.Broadcaster
|
||||
m0.Server.BroadcastReceiver = gossipNodeSet0
|
||||
m0.Server.BroadcastReceiver = gossipMemberSet0
|
||||
|
||||
if err := m0.Server.BroadcastReceiver.Start(m0.Server); err != nil {
|
||||
t.Fatal(err)
|
||||
|
|
@ -481,12 +481,12 @@ func TestMain_SendReceiveMessage(t *testing.T) {
|
|||
m1.Server.Cluster.Coordinator = m0.Server.URI
|
||||
m1.Server.Cluster.EventReceiver = gossip.NewGossipEventReceiver()
|
||||
|
||||
gossipNodeSet1 := gossip.NewGossipNodeSet(m1.Server.URI.HostPort(), gossipHost, gossipPort, gossipSeed, m1.Server, nil)
|
||||
m1.Server.Cluster.NodeSet = gossipNodeSet1
|
||||
m1.Server.Broadcaster = gossipNodeSet1
|
||||
gossipMemberSet1 := gossip.NewGossipMemberSet(m1.Server.URI.HostPort(), gossipHost, gossipPort, gossipSeed, m1.Server, nil)
|
||||
m1.Server.Cluster.MemberSet = gossipMemberSet1
|
||||
m1.Server.Broadcaster = gossipMemberSet1
|
||||
m1.Server.Handler.Broadcaster = m1.Server.Broadcaster
|
||||
m1.Server.Holder.Broadcaster = m1.Server.Broadcaster
|
||||
m1.Server.BroadcastReceiver = gossipNodeSet1
|
||||
m1.Server.BroadcastReceiver = gossipMemberSet1
|
||||
|
||||
if err := m1.Server.BroadcastReceiver.Start(m1.Server); err != nil {
|
||||
t.Fatal(err)
|
||||
|
|
|
|||
|
|
@ -85,8 +85,8 @@ func (s *Server) LocalStatus() (proto.Message, error) {
|
|||
func (s *Server) ClusterStatus() (proto.Message, error) {
|
||||
uri := pilosa.DefaultURI()
|
||||
return &internal.ClusterStatus{
|
||||
State: pilosa.NodeStateNormal,
|
||||
URISet: []*internal.URI{uri.Encode()},
|
||||
State: pilosa.NodeStateNormal,
|
||||
NodeSet: []*internal.URI{uri.Encode()},
|
||||
}, nil
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue