Commit graph

359 commits

Author SHA1 Message Date
Alan Bernstein
9bf6e1b3b7 Move LongQueryTime option to cluster section of config file 2017-04-24 15:22:12 -05:00
Travis
2ad322c2c7
Rename DB to Index
Rename `db.go` to `index.go` and `db_test.go` to `index_test.go`
2017-04-23 21:49:27 -05:00
Ben Johnson
d34687121f
Rename bitmap/profile to row/column. 2017-04-21 21:23:24 -06:00
Alan Bernstein
6a162c4be2 Support LongQueryTime as config option 2017-04-21 18:50:25 -05:00
Alan Bernstein
78704dc55a Remove SetupVersionBuild 2017-04-21 14:55:07 -05:00
Alan Bernstein
83e13bec74 Move version vars to pilosa package 2017-04-21 10:14:21 -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
6f1e3c9275 add stats metric options to config 2017-04-19 16:51:55 -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
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
32d07fc9e1 rename MessageBroker -> Broadcaster 2017-04-19 10:34:52 -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
cebca697b1 fixing tests that were affected by the messenger/view merge 2017-04-19 10:24:41 -05:00
Travis
74b81eeac1 adjustments to support the new Config structure 2017-04-19 10:21:19 -05:00
Matt Jaffee
e6309d45e1 make sure exported functions are godoc'd 2017-04-18 15:10:59 -05:00
Matt Jaffee
0a324d14a5 add fix all package level docs 2017-04-18 14:11:42 -05:00
Yuce Tekol
5b790550d0 Merge pull request #416 from yuce/375-log-path-2
Adds log-path config
2017-04-05 21:57:33 +03:00
Matthew Jaffee
e743330605 Merge pull request #401 from jaffee/cleanup-cmd-tests
add docs for cmd tests
2017-04-05 13:55:12 -05:00
Yuce Tekol
2a87c6783a Check log file size > 0 2017-04-05 19:10:41 +03:00
Yuce Tekol
63aadd9b5e Simplified log path test 2017-04-05 18:26:55 +03:00
Yuce Tekol
5353448a92 Adds log-path config 2017-04-05 16:09:43 +03:00
Ben Johnson
eff08af112 Separate physical data layout with views.
Previously, multiple frames with different prefixes were used to separate
different data layouts. This included separating standard row/column
layouts from inverted column/row layouts as well as storing aggregate
information for timestamp data.

Unfortunately, this caused frame meta data to be copied between multiple
frames and it made it difficult to keep these frames in sync.

This commit separates these different physical layouts into `Views`.
A `Frame` now has one or more views which represent each layout.
Fragments have been moved from under the `Frame` to be contained
within the `View`.

There are two primary views:

- `standard`
- `inverse`

If a frame has a time quantum, then views are generated for these
each of the standard/inverse views. For example a time quantum
of `YMDH` for the date `2000-01-02T00:00:00Z` would create the
following views:

- `standard_2000`
- `inverse_2000`
- `standard_200001`
- `inverse_200001`
- `standard_20000102`
- `inverse_20000102`

From the user's perspective, nothing should change in PQL. Different
PQL statements will handle the appropriate view automatically. For
example, `Bitmap()` and `Profile()` will fetch using the `standard`
view or the `inverse` view, respectively. The `Range()` statement
will lookup the appropriate time-based views automatically.
2017-03-24 13:57:02 -06:00
Matt Jaffee
6f27930f89 add docs for cmd tests 2017-03-21 13:45:06 -05:00
Matt Jaffee
4c693ba7e7 remove pilosa-bench 2017-03-17 16:59:08 -05:00
Matt Jaffee
60805d7f3e change port 15000 to 10101 everywhere 2017-03-17 16:43:04 -05: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
74b79dd928 add tests for subcommands 2017-03-17 16:43:04 -05:00
Matt Jaffee
9aac0d143f add tests for backup cmd 2017-03-17 16:43:04 -05:00
Matt Jaffee
a1d29537db small tweaks - make dry-run hidden 2017-03-17 16:43:04 -05:00
Matt Jaffee
e144259a19 make config flag global, and add global dry run flag
config flag can be used by all subcommands. Dry run flag stops subcommand
execution after parsing of config - nice for testing.
2017-03-17 16:43:04 -05:00
Matt Jaffee
dcafca3141 bind to localhost:0 in tests to avoid binding to the same port 2017-03-17 16:43:04 -05:00
Matt Jaffee
2aef65989e convert all commands to use RunE and global Command var 2017-03-17 16:43:04 -05:00
Matt Jaffee
601e8478da put all cmd test helpers in root_test and return errors from them 2017-03-17 16:43:04 -05:00
Matt Jaffee
e92203a466 add basic inspect test 2017-03-17 16:43:04 -05:00
Matt Jaffee
241649fc22 rename cmd.Serve->cmd.Server (gorename) 2017-03-17 16:43:04 -05:00
Matt Jaffee
60c1828dc9 nest profiling options in config file and test 2017-03-17 16:43:04 -05:00
Matt Jaffee
442380f8ab add anti-entropy interval arg 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
9a18fc11a6 support cluster poll interval arg 2017-03-17 16:43:04 -05:00
Matt Jaffee
03eae77604 add cluster.hosts flag
had to work around a bunch of viper nonsense with handling string slices

changed the validator.Check to use reflect.DeepEqual

fixed a bug where env vars need to be reset between tests

had to change the structure of pilosa.config to enable the passing of hosts as a
slice of strings (it was a slice of structs which each just contained the string
host.) so we lose some generality, but we weren't using it anyway.
2017-03-17 16:43:04 -05:00
Matt Jaffee
2af42eedb5 add replicaN to pilosa server and test 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
076cc0960a add some proof of concept command tests 2017-03-17 16:43:04 -05:00
Matt Jaffee
961d18a3bf convert all subcommands to nonglobal style 2017-03-17 16:43:04 -05:00
Matt Jaffee
c3b7710d67 WIP on converting commands to be non-global and testable 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
26a900843a move setAllConfig and it's invocation to root cmd 2017-03-17 16:43:04 -05:00