Commit graph

327 commits

Author SHA1 Message Date
Travis
95bd4913c8
adjusted DBOptions/FrameOptions logic and removed some unused tests 2017-04-20 10:41:17 -05:00
Travis
d2e68b2980
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
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
26b524a60e fix some tests and update glide.lock 2017-04-19 11:35:02 -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
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
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
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
Travis
95a546e138 adjust tests and client to comply with the new HTTP endpoints 2017-04-18 14:19:36 -05:00
Travis
63df926968 put the handler router endpoints in alphabetical order 2017-04-18 14:12:59 -05:00
Cody Soyland
a6c7a0f894 WIP handler changes 2017-04-18 14:12:59 -05:00
Cody Soyland
4397e13a82 Use gorilla mux instead of big switch statement 2017-04-18 14:12: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
Linh Vo
9abdb29269 remove duplicate code, move ValidateName out of validateOptions 2017-04-06 23:28:16 -05:00
Linh Vo
b2db339741 remove comment code 2017-04-06 16:20:08 -05:00
Linh Vo
37ffcd4ed9 refactor validateOptions 2017-04-06 16:03:35 -05:00
Linh Vo
07e689ed58 custom UnmarshalJSON unit test 2017-04-05 15:40:02 -05:00
Linh Vo
22475df035 revise unmarshalJSON 2017-04-05 10:50:56 -05:00
Linh Vo
1be7a42d14 custom Unmarshal JSON 2017-04-04 14:50:43 -05:00
Linh Vo
abd696ca56 rm govalidation phase 2017-04-03 10:50:19 -05:00
Linh Vo
c034293967 validate db and frame 2017-04-02 22:26:36 -05: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
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
75e12740d3 Merge branch 'master' into performance-enhancements 2017-03-07 15:07:21 -06:00
Travis
5f209cd063 first pass at merging the umbel-perf-improvements pass into master 2017-02-24 12:55:09 -06:00
Ben Johnson
7de0293034 Add basic schema support.
Databases and frames now require explicit creation and have the
option of setting row & column labels. If no labels are provided
then the default `id` and `profileID` labels are used.
2017-02-20 13:55:03 -07:00
Yuce Tekol
1eff86f78b Moved timestamp from HTTP query to PQL 2017-02-08 16:04:19 +03:00
Travis
d0bdea11c5 use the Build parameter as the Version in handler
Standardize on `Version` for the build version
2017-02-02 12:08:03 -06:00
Travis
1e816b401c Adds Todd's performance improvements:
- Ingore asserts in fragment container.
- Only log queries that take longer than 90 seconds.

TODO:
- address the TODOs that make the asserts configurable.
2017-01-27 13:16:27 -06:00
Cody Soyland
225bddc2a8 Add handler endpoint to get list of cluster nodes 2017-01-04 15:03:55 -06:00
Ben Johnson
7a91cbdd6d Add timestamps to import/sort.
The HTTP API, client, and `pilosactl` have been updated to allow
for a timestamp formatted using the pilosa date format of
`YYYY-MM-DDTHH:MM`.
2016-12-20 10:36:33 -07:00
Travis
659db70a57 Fixes merge conflicts related to MaxSlices.
Merge branch 'time' of github.com:benbjohnson/pilosa into benbjohnson-time
2016-12-12 09:04:23 -06:00
Ben Johnson
c6e2b1294b Add time-based frames and Range() support. 2016-12-08 12:29:49 -07:00
Travis
dd6f41f551 standardizes on MaxSlice (instead of SliceN)
creates DB locally even if node doesn't have data for that DB
2016-11-30 12:59:17 -06:00
Travis
78666d6bba Merge branch 'master' into db-specific-slices 2016-11-29 11:59:41 -06:00
Cody Soyland
5206461d51 Migrate from Umbel to Pilosa organization on Github 2016-11-28 15:21:11 -06:00
Travis
b6f0a62fdd changes MaxSlices logic to be DB-specific 2016-11-21 16:12:30 -06:00
Ben Johnson
8f78f854dd Add context to Client, Executor, & Handler.
This changes the API of the types but does not alter the functionality
since only the `context.Background()` is currently being used. Adding
`Context` will help handle fault tolerance in the future by allowing
timeouts to be propagated across calls to different nodes.
2016-11-10 13:37:00 -07:00
Ben Johnson
56aea09ce1 Add endpoint for database deletion.
Executing a request against `DELETE /db` will now delete a database.

	curl -X DELETE "http://localhost:15000/db" -d '{"db":"d"}'
2016-10-04 09:40:59 -06:00
Ben Johnson
d5ad5fbb05 Add profile & bitmap attribute anti-entropy.
Adds block-based anti-entropy for the attribute stores and hooks
into the existing `IndexSyncer` to regulate frequency of syncs.
2016-09-30 11:47:43 -06:00
Ben Johnson
39e0d22598 Add export command to pilosactl
CSV exports can now be done with the pilosactl application:

	$ pilosactl -d mydb -f myframe -o MYFILE.csv

If `-o` is not specified then the CSV is written to STDOUT. The
exporter combines all slices for the db/frame to into a single
concatenated CSV file.
2016-08-30 16:18:12 -06:00
Ben Johnson
96680a262c add http trace profiling 2016-08-12 10:58:45 -06:00
Todd Gruben
a2187b968c added info to owns fragrment error message 2016-06-10 10:19:54 -05:00
Todd Gruben
afb40fe8ef fixed typo 2016-06-07 15:29:28 -05:00