Commit graph

96 commits

Author SHA1 Message Date
Travis Turner
468ad57b6d
un-export Fragment.SetBit and Fragment.ClearBit.
adds methods to test.Holder to set/clear bits on a field.
2018-06-07 13:43:20 -05:00
Travis Turner
15cb391570
first pass at un-exporting Fragment methods 2018-06-07 11:49:39 -05:00
Travis Turner
bcec20525b
GoRename Frame to Field in view.go 2018-06-05 22:38:52 -05:00
Travis Turner
7f1ac8fdcd
remove Field* from fragment.go 2018-06-05 12:57:15 -05:00
Travis Turner
d80d3b6d51
rename cases of Field in view.go 2018-06-04 17:33:55 -05:00
Travis Turner
dcf4daf24e
rename a lot of *Field cases to *BSIGroup 2018-06-04 17:33:55 -05:00
Travis Turner
dd6b80f90d
rename fragment.SetFieldValue() to fragment.SetValue(). Still exported for tests 2018-06-04 15:08:49 -05:00
Travis Turner
17c8944685
rename view.SetFieldValue() to view.setValue() 2018-06-04 15:08:49 -05:00
Matt Jaffee
47f7beaecc
WIP removing inverse 2018-05-25 17:18:38 -05:00
Todd Gruben
6f204e11f1 cleanup local variable naming and comments for Rows 2018-05-21 11:35:34 -05:00
Todd Gruben
575e199ad8 renamed pilosa.Bitmap to Row 2018-05-21 09:12:42 -05:00
Matt Jaffee
fb8cc455b6
remove viewSlice (unused) 2018-05-14 19:29:28 -05:00
Alan Bernstein
248d9b4ffb Wrap errors in view 2018-05-08 19:53:05 -05:00
Travis Turner
16539bbab1
WIP: implement Min/Max BSI queries 2018-04-11 15:39:40 -05:00
Travis Turner
9a2aeac6f8
Clean up logger; make it honor --log-path flag.
Add functional options to NewGossipMemberSet.
2018-03-27 08:40:04 -05:00
Travis Turner
b66bedd1ef
put BoltDB behind AttrStore interface 2018-03-19 11:30:41 -05:00
Travis Turner
e454473ec7
prevent excessive sendSyce (createView) messages. 2018-02-22 16:02:43 -06:00
Travis Turner
e6ff67bd83
add index/frame/view info to delete fragment log information 2017-12-04 18:03:23 -06:00
Travis Turner
59cdd5dde9
Add HolderCleaner and view.DeleteFragment to support post-resize cleanups
Add tests for view.DeleteFragment and HolderCleaner
2017-12-04 18:03:22 -06:00
Charlie Andrews
b6509a3ad7 Add RecalculateCaches to every level in hierarchy
This to decouple the implementation of recalculating caches from the
structure of the hierarchy: holder > index > frame > view > fragment.
See [Law of Demeter](https://en.wikipedia.org/wiki/Law_of_Demeter).
2017-10-11 09:36:32 -05:00
Travis Turner
917f41e8eb Merge pull request #847 from travisturner/field-range-between
Implements BETWEEN for Range queries.
2017-09-27 11:14:31 -05:00
Matthew Jaffee
3aecb61285
more read-only locking for maxslice, timequantum, and Index.Frames 2017-09-25 15:20:17 -05:00
Matthew Jaffee
ce7283ae1b
convert to RWMutex in index, holder, view, and frame
use RLock and RUnlock in mapperLocal hotpath
2017-09-25 15:16:40 -05:00
Travis
2b88d278bc
Implements BETWEEN for Range queries.
The PQL looks like:
```
Range(frame=f, field0 >< [200,610])
```

One thing I noticed while implementing this is that it doesn't seem
like `FieldRange()` is used in either `Frame` or `View`; the Executor
calls `Fragment.FieldRange()` directly. The problem with this is that
the offset logic is calculated in the Frame, but since the Executor
doesn't go through Frame, then the Executor also has to calculate
the offset before calling `Fragment.FieldRange`. We should unify this
logic somewhere. Note, this applies to both `FieldRange` and
`FieldRangeBetween`.
2017-09-25 15:11:04 -05:00
Michael Baird
62791e7a2f Merge pull request #785 from raskle/613-delete-view
Delete view API
2017-08-28 13:38:07 -05:00
Ben Johnson
ad847f2c8a
Add field Range() support to Executor. 2017-08-24 13:34:57 -06:00
Michael Baird
2dfa689d71 Fragment.Close now returns an error.
This required changing the Holder test utility Reopen, since in those cases we needed to close the file before making permission changes that Close() was failing silently on.
2017-08-22 14:52:07 -05:00
Ben Johnson
562fba9de1
Sum() and Average() field queries. 2017-08-22 08:27:52 -06:00
Ben Johnson
0bb94fc83d
Implement BSI Field Range internally
This commit adds `FieldRange()` to the `Frame`, `View`, and
`Fragment` types. It accepts an operator & a predicate and
returns a bitmap of matching field values.
2017-08-01 14:44:53 -06:00
Ben Johnson
800e3844f9
Set & retrieve field values.
This commit adds support for set/get field values at the
`Frame`, `View`, and `Fragment` levels.
2017-06-30 12:21:21 -06:00
Ben Johnson
3a43a862ec
Add Holder test coverage. 2017-06-12 13:07:26 -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
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
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
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
25e649add8 remove cacheSize argument from NewFragment() 2017-04-19 11:41:41 -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
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
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
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
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