Commit graph

246 commits

Author SHA1 Message Date
Michael Baird
b2343c5ce3 Stats uses the same logger output as the cluster 2017-05-16 10:52:10 -05:00
Michael Baird
bd44949cb5 Merge remote-tracking branch 'origin/master' into metrics
Conflicts:
	config.go
	executor_test.go
	server/server.go
2017-05-09 11:31:14 -05:00
Michael Baird
bf6ed942f0 Merge pull request #8 from alanbernstein/stats
Stats
2017-05-09 11:15:23 -05:00
Ben Johnson
e3d6f96657
Add max-writes-per-requests limit.
A configurable limit has been added to restrict the number of
mutating calls in a `pql.Query`. This is to prevents requests from
timing out from large queries.

The default is set to 5000 writes per request and is configurable
through the configuration file and the command line flags.
2017-05-03 08:53:20 -06:00
Michael Baird
ee159b455d Merge remote-tracking branch 'origin/master' into metrics
Conflicts:
	.gitignore
	cluster.go
	frame.go
	glide.lock
	index.go
2017-05-01 10:41:04 -05:00
Cody Soyland
3996b56b88 Apply Apache License 2.0 2017-04-28 14:22:03 -05:00
Michael Baird
e699c55700 fixed conflicts from the db index change
Conflicts:
	cluster.go
	executor_test.go
	handler_test.go
	server.go
2017-04-25 11:47:29 -05:00
Michael Baird
5a8c165c53 Merge remote-tracking branch 'origin/master' into metrics
Conflicts:
	cache.go
	cluster.go
	db.go
	executor.go
	fragment.go
	frame.go
	gossip/gossip.go
	handler.go
	index.go
	server.go
	server/server.go
2017-04-24 16:35:25 -05:00
Alan Bernstein
5413597998 Move LongQueryTime option to cluster section of config file 2017-04-24 15:20:08 -05:00
Michael Baird
445023a04f fixed some comments 2017-04-24 14:21:50 -05:00
Michael Baird
1dc5d6f348 handle Join error 2017-04-24 14:14:16 -05:00
Michael Baird
acc4b022d7 added Join method to Static Nodeset so that Status is calculated with the local node 2017-04-24 13:57:35 -05:00
Alan Bernstein
615c830ecc Move LongQueryTime to Cluster 2017-04-24 11:31:50 -05:00
Travis
2cacff8e09
Rename Index to Holder
Rename `index.go` to `holder.go` and `index_test.go` to `holder_test.go`
2017-04-23 15:59:20 -05:00
Alan Bernstein
6a162c4be2 Support LongQueryTime as config option 2017-04-21 18:50:25 -05:00
Michael Baird
c4334b1ac6 The server uses the stats service specified in the config 2017-04-19 17:22:00 -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
c4d3bde501 move gossip code to separate package 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
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
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
Travis
8fa45649b6 WIP: Added support for NodeState.
Modified the gossip implementation to optionally send messages directly (instead of over gossip).
Added support for local and remote NodeState, as well as function to merge remote into local state.
Refactored Protobuf models to include `DBMeta` and `FrameMeta` as well as support for NodeState.
2017-04-19 10:19:17 -05:00
Travis
2b35df879c WIP: first pass at sending CreateDB() through Messenger 2017-04-19 10:15:57 -05:00
Matt Jaffee
0a324d14a5 add fix all package level docs 2017-04-18 14:11:42 -05:00
Yuce Tekol
6c7b1b513a return log err too 2017-04-05 21:35:30 +03:00
Yuce Tekol
5353448a92 Adds log-path config 2017-04-05 16:09:43 +03:00
Matt Jaffee
176861d702 add embedded struct to contain io for commands
per @tgruben's suggestion
2017-03-17 16:43:04 -05:00
Matt Jaffee
5f267c0a3a support the various ways of specifying bind addr 2017-03-17 16:43:04 -05:00
Matt Jaffee
06b90782af remove ConfigPath from server (no longer used) 2017-03-17 16:43:04 -05:00
Matt Jaffee
b291307dde add plugins path arg to server
also fix an issue where tests would hang if an invalid config file was given
2017-03-17 16:43:04 -05:00
Matt Jaffee
372b7ca1c4 full testing support for pilosa server
1. fixed a couple bugs with config file reading.
2. made cmd.Serve a global variable so tests could inspect it.
3. added table style testing for pilosa server
4. added the ability to stop server programmatically which also causes the cobra
command running it to return.
2017-03-17 16:43:04 -05:00
Matt Jaffee
943e8ece1e add data-dir flag and simplify server/server.go
Now that the default data dir is defined by the flag, we don't need to set it
explicitly if it isn't set. We also stop reading the config file explicitly in
server.go since viper will read it - we do need to define all the config options
though before the config file will work properly.
2017-03-17 16:43:04 -05:00
Matt Jaffee
72de534c8c remove duplicate Version/BuildTime from pilosa/server
use only the pilosa/cmd Version and BuildTime which are populated by the ldflags
in the Makefile
2017-03-09 11:39:11 -06:00
Matt Jaffee
320110f011 tweak comments and remove dead code 2017-03-07 11:35:58 -06:00
Matt Jaffee
555a514e37 code review tweaks 2017-03-07 11:30:31 -06:00
Matt Jaffee
756c44c17d fix bugs with pilosa server -config and remove dead code 2017-03-06 10:19:50 -06:00
Matt Jaffee
02c3c6d3e6 use cobra/viper and move cmd/pilosa to server subcommand 2017-03-03 13:03:57 -06:00