Commit graph

27 commits

Author SHA1 Message Date
Linh Vo
5aea6095f0 add tests 2017-03-02 15:27:33 -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
Ben Johnson
f39768b49b Refactor parser & AST to remove compile-time field names.
Consolidates all the pql.Call implementations into a single
pql.Call struct. This is needed to support user-defined schemas
on frames.

This also has the added benefit that a lot of redundant parsing
code has been consolidated.
2017-02-02 14:27:18 -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
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
722d697228 refactor in-memory bitmap storage
This commit changes the underlying storage for `Bitmap` from a
red-black tree to a roaring bitmap. It also removes bitmaps from
the cache and only stores the bitmap count.
2016-05-24 15:01:49 -06:00
Ben Johnson
a0a519bfdf refactor main into pilosa.Server
This commit refactors most of the code in `cmd/pilosa` to
`pilosa.Server` so that it can be reused in long running cluster
testing.
2016-05-13 14:39:09 -06:00
Ben Johnson
569bafdc7d add bulk call support to the query endpoint
This commit changes the `pql.Query` so that it can accept one or more
top-level calls instead of only one.

The query request format change because a query with a single call is
still valid. However, the result format now returns a `results` field
that has one result for each top-level call. The `profiles` field is
still the same, however, it combines all profiles from all bitmap
responses into one return so that there's not duplicate attributes.

Fixes #59
2016-03-08 14:34:37 -07:00
Ben Johnson
5a63a14742 refetch full counts for TopN()
This commits adds refetching to get the actual TopN() count
after the top bitmaps are determined.

Fixes #57
2016-03-03 13:03:20 -07:00
tgruben
a58468fc7a Merge pull request #56 from benbjohnson/backup
Add backup/restore to pilosactl
2016-02-29 10:49:58 -06:00
Todd Gruben
24260e9d0c test for topn fill 2016-02-29 10:18:57 -06:00
Ben Johnson
5d79555d3e add backup/restore to pilosactl
This commit adds two commands:

    pilosactl backup
    pilosactl restore

The `Client` implementations have also been added to support these
commands:

    func (c *Client) BackupTo(w io.Writer, db, frame string) error
    func (c *Client) RestoreFrom(r io.Reader, db, frame string) error

Backups occur on a per-frame basis and all slices from the cluster
are packed into a single tar file. The backup tool attempts to
read from owner nodes in a random order and will retry against
the next owner if one fails.

During restore, the slices are restored to all owner nodes. This
allows users to backup a frame from one cluster and restore it
to a different one -- even if the topology of the new cluster is
different.
2016-02-29 08:38:24 -07:00
Todd Gruben
759ad537be merged 2016-02-24 14:19:44 -06:00
Todd Gruben
9fc6a39d65 adjust SetBit/ClearBit to releably report bit change 2016-02-24 14:00:41 -06:00
Ben Johnson
cca8970019 add Range() support
This commit adds support for setting bits in time-based frames.
2016-02-23 14:53:03 -07:00
Ben Johnson
f0fa03da83 refactor attribute stores
This commit refactors the profile and bitmap attribute stores so
that they share the same code. There is a new `AttrStore` which
associates key/value pairs with a `uint64` identifier.

The previous JSON encoding has been fixed to use protobufs which
fixes encoding issues for int64.
2016-02-16 13:41:37 -07:00
Ben Johnson
d3500c64f7 TopN()
This commit adds TopN() functionality to the fragment, executor
and handler.
2016-02-09 14:43:49 -07:00
Ben Johnson
e0937b79c0 add bitmap and profile attribute support
This commit adds the ability to set string, integer, and boolean
values on bitmaps and profiles within Pilosa. Bitmap attributes
are automatically returned when making a `Bitmap()` call. Profile
attributes must be requested by setting `profile=true` in the
URL.

The function names have also been renamed to initial caps so that
the PQL query language can support math operations in the future.
2016-02-01 08:44:33 -07:00
Ben Johnson
320e9811d8 bulk importer
This commit adds the pilosactl binary with a single `import` command.
The import allows users to bulk import data from a CSV file.
2016-01-02 15:10:17 -07:00
Ben Johnson
784beb074e roaring storage
This commit attaches the mmap-backed roaring bitmaps as storage
to the fragments. Currently snapshotting is not supported from
Pilosa so the WAL will grow indefinitely, however, it is not a
difficult change to make.
2015-12-17 20:35:33 -07:00
Ben Johnson
273ac22122 add set execution
This commit adds `set()` execution to the Executor. When a set is
issued and the replication factor is greater than 1 then the
query will be forwarded to all other nodes that own the partition.

Currently there is not a way to recover from a `set()` that only
succeeds on some nodes.
2015-12-03 20:13:17 -07:00
Ben Johnson
a632d08629 refactor
This commit refactors the pilosa codebase. It makes several major
changes:

* Removes bitmap handles
* Removes dispatch/hold/transport
* Removes etcd dependency
* Adds consistent hash ring for slice placement
* Refactors parser/lexer
* Adds strong typing to PQL AST
* Flattens package hierarchy
2015-12-02 15:34:49 -07:00