Commit graph

3762 commits

Author SHA1 Message Date
Travis Turner
f6f1252ff7 Merge pull request #462 from travisturner/import-inverseenabled
Don't try to create inverse views on Import() when inverseEnabled is …
2017-04-19 18:10:07 -05:00
Travis
6268c96264
add a client test for imports to an inverseEnabled frame 2017-04-19 18:05:22 -05:00
Travis
5c50ab8f0e add a client test for imports to an inverseEnabled frame 2017-04-19 18:05:22 -05:00
Travis
35383b9b9c
Don't try to create inverse views on Import() when inverseEnabled is false 2017-04-19 17:27:08 -05:00
Travis
1ed4ecef25 Don't try to create inverse views on Import() when inverseEnabled is false 2017-04-19 17:27:08 -05:00
Michael Baird
b0b6e2c544 measure runtime stats
added package to measure when garbage collection occurs
2017-04-19 17:22:40 -05:00
Michael Baird
7da469d62d measure runtime stats
added package to measure when garbage collection occurs
2017-04-19 17:22:40 -05:00
Michael Baird
c4334b1ac6 The server uses the stats service specified in the config 2017-04-19 17:22:00 -05:00
Michael Baird
ef5fbddf37 The server uses the stats service specified in the config 2017-04-19 17:22:00 -05:00
Michael Baird
fea18bc14b specify the StatsD host string 2017-04-19 17:21:08 -05:00
Michael Baird
8fe0ee47cc specify the StatsD host string 2017-04-19 17:21:08 -05:00
Travis
d2e68b2980
adjust some handler comments. remove debugging line 2017-04-19 17:08:10 -05:00
Travis
c101f647c8 adjust some handler comments. remove debugging line 2017-04-19 17:08:10 -05:00
Travis
5a80685052
add support for CreateDB and CreateFrame without POST data (i.e. use defaults) 2017-04-19 16:59:56 -05:00
Travis
f3189889d4 add support for CreateDB and CreateFrame without POST data (i.e. use defaults) 2017-04-19 16:59:56 -05:00
Michael Baird
465f9806c6 fix server tests to bind to new node if changing the node set 2017-04-19 16:52:49 -05:00
Michael Baird
df2e282bdf fix server tests to bind to new node if changing the node set 2017-04-19 16:52:49 -05:00
Michael Baird
6f1e3c9275 add stats metric options to config 2017-04-19 16:51:55 -05:00
Michael Baird
20bc2396f8 add stats metric options to config 2017-04-19 16:51:55 -05:00
Michael Baird
40cb2adef6 add cache stats 2017-04-19 16:27:39 -05:00
Michael Baird
8440bc8b3c add cache stats 2017-04-19 16:27:39 -05:00
Travis
caf35bb4d9
rename messenger_test to align with broadcast 2017-04-19 16:07:30 -05:00
Travis
68d9d1543f rename messenger_test to align with broadcast 2017-04-19 16:07:30 -05:00
Travis
dcaf7617de
changed some json tag names to Lower Camel Case to be consistent with the rest 2017-04-19 14:01:46 -05:00
Travis
a6c6f4d1c1 changed some json tag names to Lower Camel Case to be consistent with the rest 2017-04-19 14:01:46 -05:00
Travis
25e649add8 remove cacheSize argument from NewFragment() 2017-04-19 11:41:41 -05:00
Travis
26b524a60e fix some tests and update glide.lock 2017-04-19 11:35:02 -05:00
Travis
4c8e46e17f change Config.Nodes to Config.Hosts 2017-04-19 10:37:00 -05:00
Travis
b4a69be751 Add support for Node.InternalHost.
This was required for the HTTPBroadcaster to run locally on different InternalPorts.
2017-04-19 10:37:00 -05:00
Matt Jaffee
a11daecfcb remove done TODO 2017-04-19 10:36:28 -05:00
Matt Jaffee
d10d8d94e1 simplify config structure - remove gossip sub-struct 2017-04-19 10:36:28 -05:00
Matt Jaffee
0da580d0e9 change broadcaster-type to type
It is nested under "cluster" in the config, and it controls cluster membership
as well as broadcasting, so I think type is more appropriate. Also, brevity.
2017-04-19 10:36:28 -05:00
Matt Jaffee
6e8bf5dcc1 move http messenger stuff to separate package 2017-04-19 10:36:27 -05:00
Matt Jaffee
d2621709f1 move NodeSet out of cluster.go into broadcast and messenger
HTTP implementation will be split into separate package.
2017-04-19 10:36:27 -05:00
Matt Jaffee
802fd32988 separate broadcast interfaces from implementations
interfaces are in broadcast.go and http implementations in messenger.go (gossip
is already in a separate package). Next changes will bring in the HTTP nodestate
implementation, and separate the http implementation into a separate package.
2017-04-19 10:36:27 -05:00
Matt Jaffee
c4d3bde501 move gossip code to separate package 2017-04-19 10:36:27 -05:00
Matt Jaffee
059403e673 add stateHandler interface to gossip
now it doesn't need to directly reference pilosa.Server
2017-04-19 10:36:27 -05:00
Matt Jaffee
2d139d299c remove server from handler - not used anymore 2017-04-19 10:36:27 -05:00
Matt Jaffee
bc8f7f702f add BroadcastReceiver and collapse Gossip structs into one
GossipNodeSet and GossipBroadcaster had a lot of cross dependency - I made them
the same object and had it implement all three interfaces (NodeSet, Broadcaster,
BroadcastReceiver).

I implmented an HTTPBroadcastReceiver which runs as as separate server.
BroadcastReceiver is a separate entity on the pilosa.Server object and is
started separately from broadcaster and nodeset. In the case of GossipNodeSet,
the broadcast receiver must be started before Open()ing the Nodeset, because it
doesn't actually start listening until Open() is called, but it needs the
handler set up before then.

server/server.go was heavily refactored to configure the new structs and
interfaces on the pilosa.Server object.
2017-04-19 10:36:27 -05:00
Matt Jaffee
4fc2494cc0 add panic if Atoi on DefaultGossipPort fails 2017-04-19 10:34:52 -05:00
Matt Jaffee
32d07fc9e1 rename MessageBroker -> Broadcaster 2017-04-19 10:34:52 -05:00
Matt Jaffee
4b8c2630e3 split MessageBroker.Send into SendSync and SendAsync 2017-04-19 10:34:30 -05:00
Matt Jaffee
5079ee7a22 remove messenger "wrapper" around messagebroker
all the functionality aside from the broker has been removed
2017-04-19 10:33:59 -05:00
Matt Jaffee
1aca2ce1de implement LocalState and internal message reception on Server
greatly simplifies Messenger, to the point of making it basically shell around
MessageBroker. Next stesp are to make the receiving of internal messages more
well-defined and behind an interface, remove/merge Messenger and MessageBroker,
and have the implementations of MessageBroker in separate packages.
2017-04-19 10:33:26 -05:00
Matt Jaffee
25f3ac92bd move complex, implementation-specific config bits out of config.go
moved into pilosa/server/server.go with minimal changes for now - had to tweak a
few things to be able to get at unexported fields. Next step will be to move the
implementations of NodeSet and MessageBroker out of the pilosa package so that
pilosa core knows nothing about them. pilosa/server will deal with any
complexities involved in setting them up.
2017-04-19 10:33:26 -05:00
Matt Jaffee
10a6cead17 remove unused methods on StaticNodeSet
these used to implement the NodeSet interface, but they've since been removed
from NodeSet
2017-04-19 10:33:26 -05:00
Matt Jaffee
340cbc0cd0 fix comment s/list/map 2017-04-19 10:33:26 -05:00
Matt Jaffee
5cc4080ccf remove unused SetMessenger method 2017-04-19 10:33:26 -05:00
Travis
b0f1fc7523 Makes Messenger a first-class object under Server (with pointers in Handler and Index).
Primary message interface is the MessageBroker which is an attribute of the Messenger.
MessageBroker implementations:
- Gossip (memberlist)
- Broadcast (uses HTTP, received by existing Handler)
- Static (no-ops)

Changes CacheSize from `int` to `uint32` for consistency with protobuf.
Removes unnecessary dependencies in glide:
- `github.com/aws/aws-sdk-go`
- `golang.org/x/net` (although this gets included by memberlist)

TODO:
- [ ] Add tests around the Messenger and MessageBroker objects.
- [ ] Refactor CreateSliceMessage to work with views.
- [ ] Support propogation of meta data on PATCH calls.

fixing some issues from last rebase
2017-04-19 10:33:26 -05:00
Michael Baird
8e2e9254f7 fixed comment 2017-04-19 10:26:47 -05:00