Commit graph

97 commits

Author SHA1 Message Date
Matt Jaffee
c828953702 change the default num and try to fix some tests 2017-05-01 16:58:45 -05:00
alanbernstein
ae7b2615fe Merge branch 'master' into webui-updates 2017-04-29 18:57:13 -05:00
Alan Bernstein
75f2ff8cf0 Show statik error in browser 2017-04-29 16:22:26 -05:00
Alan Bernstein
2c3e35fa90 Don't panic on statik failure 2017-04-29 10:16:58 -05:00
Cody Soyland
3996b56b88 Apply Apache License 2.0 2017-04-28 14:22:03 -05:00
Michael Baird
08590be4c3 Merge pull request #490 from raskle/485-godocs
godoc cleanup
2017-04-26 15:37:12 -05:00
Yuce Tekol
d2b2e258df
Renamed /nodes to /hosts 2017-04-26 02:19:17 +03:00
Michael Baird
d2a7869142 comment cleanup 2017-04-25 16:40:39 -05:00
Alan Bernstein
f795fbb116 Merge master 2017-04-25 15:32:01 -05:00
Michael Baird
3512dd4549 missing comments 2017-04-25 14:15:02 -05:00
Travis
74bf4731f5
WIP: Implement NodeState as an attribute of *Node
NodeState is shared among nodes in the cluster (via gossip
in a gossip implementation) and cached locally in Cluster.Nodes
in order to be available to the /status endpoint.
2017-04-24 12:33:43 -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
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
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
e1404cf330 change variable name of getValidOptions 2017-04-21 11:42:31 -05:00
Linh Vo
7e935dd90a rewrite custom UnmarshalJSON for postDBRequest and postFrameRequest 2017-04-21 11:37:32 -05:00
Cody Soyland
41c900c9c4 Add WIP pared-down webui/console prototype 2017-04-21 10:52:44 -05:00
Linh Vo
9198dfab59 inverseEnabled check for bool type 2017-04-20 22:11:01 -05:00
Linh Vo
9c02edc4e3 #457 rewrite validateOptions, update frame options 2017-04-20 17:28:22 -05:00
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