Commit graph

68 commits

Author SHA1 Message Date
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
95a546e138 adjust tests and client to comply with the new HTTP endpoints 2017-04-18 14:19:36 -05:00
Matt Jaffee
6f443f447a add signed int support
this affects the scanner/parser and makes it produce signed ints rather than
uints, and so it affects all code that is expecting unsighed ints to come out of
the parser.
2017-04-18 12:50:26 -05:00
Ben Johnson
9cbc786376 Consolidate Bitmap() & Profile() calls.
This commit changes the executor to select a bitmap from the
standard view or the inverse view based on whether the row label
or column label is specified.
2017-04-17 13:48:56 -06:00
Ben Johnson
306cc0b64e Opt-in to inverse storage. 2017-04-12 08:34:31 -06:00
Ben Johnson
2731311378 Refactor higher level view interface. 2017-04-05 17:00:31 -06:00
Linh Vo
07ce417f55 Merge pull request #410 from linhvo/378-set-profile-attr
SetProfilesAttrs with option column
2017-03-27 10:29:07 -05: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
Linh Vo
292302f60b fix test 2017-03-24 13:45:00 -05:00
Linh Vo
7979b4d69b set profile attr for columnLabel 2017-03-24 12:18:59 -05:00
Linh Vo
0a4de77d38 add tanimoto option to pilosa 2017-03-10 13:45:18 -06:00
Travis
988e602033 adds validateCallArgs(c) to executor 2017-03-10 09:36:05 -06:00
Travis
41d334aeaf If a top-n query contains BitmapIDs, then treat N as having value 0. 2017-03-08 16:09:56 -06:00
Travis
75e12740d3 Merge branch 'master' into performance-enhancements 2017-03-07 15:07:21 -06:00
Matt Jaffee
6216c4fb8a don't panic if 'n' not supplied to TopN 2017-03-06 15:34:57 -06:00
Matt Jaffee
57de42bb91 fix empty queries crashing pilosa 2017-03-02 16:27:45 -06:00
Travis
cbac9ec88b move BitmapCache into cache.go. adjust some variable names for clarity 2017-03-02 15:17:21 -06:00
Yuce Tekol
41b6a6f49c Merge pull request #342 from yuce/setbit-time-format-315
Setbit time format. Implements ticket 315
2017-03-02 22:45:29 +02:00
Todd Gruben
9237e7b699 rank cache update after count
heap sort order backwards

WIP TopN accuracy

adjusted first phase topn to collect all slices id's

incorrect handling of large topns

cache performance enhancement

fix for failed test TestMain_FrameRestore

remove unused code and fix some variable names
2017-03-02 12:32:53 -06:00
Travis
22e9c1cafa modify needsSlices() to use call.Name 2017-02-27 11:33:55 -06:00
Travis
5f209cd063 first pass at merging the umbel-perf-improvements pass into master 2017-02-24 12:55:09 -06:00
Yuce Tekol
6f645b9db5 SetBit uses TimeFormat. Implements 315 2017-02-24 16:35:41 +03:00
Todd Gruben
774dc14412 handle empty Union/Intersect 2017-02-22 18:11:06 -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
7105c89398 run gofmt on the previous commit 2017-01-27 17:48:44 -06:00
Todd Gruben
e3f4eab5ac removed maxslice from setbit path 2017-01-27 18:42:47 -05: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
94395b4fce Add fault tolerance to executor. 2016-11-17 12:02:53 -07: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
tgruben
53dc73a1ad Merge pull request #126 from umbel/clearbit_bug
added remote termination clause for clearbit
2016-10-18 15:54:42 -05:00
tgruben
084f08b7b8 Merge pull request #124 from benbjohnson/123-clear-bit-fix
Fix ClearBit() file handle issue.
2016-10-18 15:12:03 -05:00
Todd Gruben
fb7bd66bc2 added remote termination clause for clearbit 2016-10-18 15:10:02 -05:00
Ben Johnson
aaf88563e3 Handle return data from remote ClearBit()
Previously `ClearBit()` did not handle returned data correctly
and panicked. This change adds it to the list of available return
types.
2016-10-18 11:54:00 -06:00
Ben Johnson
3edaa2e81d Fix ClearBit() file handle issue.
Previously the index would create a fragment if it didn't exist
when clearing a bit. This causes additional file handles to be
created when it's already known that the bit is not set.
2016-10-18 10:27:38 -06:00
Ben Johnson
cf4297a771 Optimize TopN() w/ source query.
This commit makes several changes to optimize the TopN() query:

- Reduce highbits() back from 24-bits to 16-bits.
- Reduce MaxArraySize back from 2^20 to 4096.
- Optimize bitmap count invalidation.
- Parallelize TopN() across nodes.
- Parallelize TopN() across slices.
2016-09-13 14:55:56 -06:00
Ben Johnson
c54047041d forward bitmap & profile attributes
This commit adds forwarding of bitmap and profile attributes to
other servers in the cluster.
2016-07-19 13:54:01 -06:00
Ben Johnson
1126e7b5f7 optimize bulk bitmap attribute update
This commit adds a fast path for optimizing queries that only
have `SetBitmapAttrs()` calls in them. It does this by grouping
the calls into a single Bolt transaction and also by merging
multiple attribute updates per ID into one update.
2016-06-22 20:04:49 -06:00
Todd Gruben
b40b2ff5ca Merge branch 'master' of github.com:umbel/pilosa 2016-06-07 15:25:42 -05:00
Todd Gruben
dab399e328 added logging on import;crashing bug on sync on empty fragment 2016-06-07 15:25:37 -05:00
Ben Johnson
14627a2152 use db in fragment allocation
This commit changes the fragment allocation algorithm in the cluster
to make use of the `DB` name. This allows each database to use a
different slice distribution.

Initially, the `frame` was going to be used for allocation, however,
this was problematic since queries can span multiple frames so it's
impossible to choose a single frame to use.
2016-06-07 14:01:13 -06: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