Commit graph

66 commits

Author SHA1 Message Date
Ben Johnson
0107ddffea
BSI range-encoding schema support. 2017-06-21 08:53:30 -06:00
Michael Baird
60cd24b368 set maxSlice StatsD gauge on get max slice 2017-05-16 14:00:54 -05:00
Michael Baird
4a051900c0 Add sampling rate to StatsD functions, and fix data dog logging 2017-05-16 10:35:49 -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
Matt Jaffee
11b84cec94 change default cache type to ranked
All tests which use MustOpenFragment now explicitly pass a cacheType parameter.
If this parameter is an empty string, it means that whether the test works
should not depend on the cache type of the fragment. Otherwise the test should
explicitly set the cache type it needs rather than relying on the default.
2017-05-02 16:58:03 -05: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
Travis
692d997cab
add labelRegexp to validate row and column labels 2017-04-29 15:01:18 -05:00
Travis Turner
a1871388b0 Merge pull request #504 from travisturner/default-row-label
change DefaultRowLabel from `id` to `rowID`
2017-04-28 22:06:34 -05:00
Travis
0b5e058579
change DefaultRowLabel from id to rowID 2017-04-28 15:26:30 -05:00
Cody Soyland
3996b56b88 Apply Apache License 2.0 2017-04-28 14:22:03 -05:00
Travis
7246e1e00d
Broadcast CreateSliceMessage when a new max slice is created 2017-04-27 11:44:13 -05:00
Michael Baird
866c5e8773 Merge remote-tracking branch 'origin/metrics' into stats-view-tag
Conflicts:
	frame.go
2017-04-25 09:45:52 -05:00
Travis
cd6b3f9605
During import, write to standard view as well as time views 2017-04-24 18:43:33 -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
dd465cc77b Fix typo to add view tag 2017-04-24 15:13:07 -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
Travis Turner
ea663b980f Merge pull request #435 from travisturner/messenger-rebase
Messenger rebase
2017-04-21 14:04:27 -05:00
Linh Vo
100fcfdc6b reformat 2017-04-20 21:39:47 -05:00
Linh Vo
4f07113f65 readd stastD report with new branch 2017-04-20 21:37:31 -05:00
Michael Baird
9cff292bed Merge remote-tracking branch 'upstream/master' into metrics 2017-04-20 16:35:21 -05:00
Travis
95bd4913c8
adjusted DBOptions/FrameOptions logic and removed some unused tests 2017-04-20 10:41:17 -05:00
Travis
749ffdcf65 adjusted DBOptions/FrameOptions logic and removed some unused tests 2017-04-20 10:41:17 -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
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
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
Michael Baird
ce1e8e2e75 changed the frame cache name 2017-04-19 10:24:00 -05:00
Michael Baird
8e2592e706 store cache size in Frame metadata 2017-04-19 10:22:44 -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
7c2f6a9bae adds a basic gossip implementation using hashicorp/memberlist
Changes Gossiper to NodeSet.
Adds StaticNodeSet (for testing) and GossipNodeSet (for memberlist) implementations.
Changes NodeSet interface to return a pilosa-specific generic instead of `NodeSet interface`.
Removes NumMembers from interface (which is specific to memberlist).

Implements a Messenger interface with which to send inter-node messages via NodeSet.
The Pilosa implementation occurs in the GossipNodeSet.

Implements the Messenger as an object on Server, Handler, and Index.

Uses HealthStatus constants.
Removes commented-out code.

for gossip, make sure to bind to both host and port, and advertise those as well

adjust messenger to work with the db schema logic

add dependencies: hashicorp/memberlist, golang.org/x/sync
add dependency: golang.org/x/net

Uses `errgroup` to handle errors from broadcast messages.
Marshals message one time instead of once for every node.
Adds error handling for some errors that were being swallowed.
2017-04-19 10:13:38 -05:00
Michael Baird
8ceaef1eaa fragment cache size is set on frame creation with a default value of 50,000 2017-04-19 10:06:10 -05:00
Matt Jaffee
e6309d45e1 make sure exported functions are godoc'd 2017-04-18 15:10:59 -05:00
Ben Johnson
d32edb5329 Add cacheType to frame options.
Previously the cache type (`lru` or `ranked`) was determined by
checking the ending suffix of the frame. If it ended with a `.n`
then it was ranked. Otherwise it was an LRU.

This commit changes frames so that a `cacheType` option can be
passed in during creation to set either `lru` or `ranked`.
2017-04-18 08:24:58 -06:00
Ben Johnson
a302521968 Merge pull request #447 from benbjohnson/inverse-opt-in
Opt-in to inverse storage.
2017-04-13 10:04:25 -06:00
Linh Vo
172f7490f6 fixed conflicts 2017-04-12 12:31:56 -05:00
Ben Johnson
306cc0b64e Opt-in to inverse storage. 2017-04-12 08:34:31 -06:00
Linh Vo
9abdb29269 remove duplicate code, move ValidateName out of validateOptions 2017-04-06 23:28:16 -05:00
Ben Johnson
2731311378 Refactor higher level view interface. 2017-04-05 17:00:31 -06:00
Ben Johnson
912fcb3464 Separate max slices for standard and inverse views.
Previously only the standard max slice was available. This commit
changes it so that the inverse max can be retrieved separately
through the `DB` and `Frame` types as well as through the
`HTTP` API and `Client`.
2017-03-28 13:01:04 -06:00
Ben Johnson
3a71003240 Re-sort inverted bits on import. 2017-03-24 13:57:02 -06: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
Travis
3649a52c00 Change frame meta and data to .meta and .data to be consistent with the DB dot files. 2017-03-10 15:47:17 -06:00
Linh Vo
4e31d02979 wrap regexp in function 2017-03-06 12:31:51 -06:00
Linh Vo
c6a502efed fix review 2017-03-06 11:03:17 -06:00
Linh Vo
69cfdb0df9 clean up 2017-03-02 16:06:34 -06:00
Linh Vo
5aea6095f0 add tests 2017-03-02 15:27:33 -06:00
Linh Vo
7d30b72d43 add restriction database 2017-02-21 10:09:49 -06:00