Comments (3)
Note: we will probably move to a model where there is a separate Segment key from the sort key. The sort key is the primary key within a partition, whereas all records with the same segment key map into the same segment. Within a segment, rows will be sorted by the sort key.
The segment key does not need to be a physically separate column. It could, and may usually be, a computed function on another column. For example, let's say for a time-series example, the sort key is a composite of ["timestamp", "uuid"]. Let's say we want to group all records into 30-second buckets. Then the segment key would be (timeslice timestamp 30s)
which is a function slicing the timestamp column (assumed to be milliseconds) into 30-second buckets.
from filodb.
Proposed initial set of expressions:
(timeslice <ms-timestamp-col> <timeunitstr>)
(round <int/long col> <number>)
-- the default 10000 segment len would be the function(round colA 10000)
(stringPrefix <str col> <numChars>)
-- gets the first numChars of the string
Some relevant code, for rounding:
def getSegment(key: Long): (Long, Long) = {
val segmentNum = key / segmentLen
(segmentNum * segmentLen, (segmentNum + 1) * segmentLen)
}
for string prefixing:
def getSegment(key: String): (String, String) = {
val start = key.take(prefixLen)
val end = start.take(start.length - 1) + ((start(start.length - 1) + 1).toChar)
(start, end)
}
from filodb.
Also:
(getOrElse <col name> <default value>)
-- provide a default value if the column value is null(autoid)
-- generate an auto incrementing ID within each partition (need to think about how this works - might be a TimeUUID)(const <val>)
- returns a constant value. Only useful for doing a default partition key.
from filodb.
Related Issues (20)
- Filo actors unreachable in filodb 0.7 HOT 16
- Filo full scan freeze HOT 3
- IN optimization and controlling task size during multipartition scan HOT 1
- Predicate pushdown is not working when a single table query has multiple conditions on the same column HOT 1
- Ability to merge ranges and create a larger token range to reduce number of tasks
- Errors setting up ingestion: ArrayBuffer HOT 5
- sbt test are failing HOT 4
- Try using Quotient Filters
- Unable to fetch data for a specific partition key when partition key is defined with more than 4 columns. HOT 5
- FiloDB Write format filodb.spark giving errors HOT 2
- FiloDB write format fails for Binary HOT 1
- Dataset creation ERROR DatasetCoordinatorActor: HOT 29
- Configured Filodb Failed HOT 1
- JVM Errors/Java Nullpointer exceptions HOT 5
- Upgrade to Scala 2.12 HOT 19
- Upgrade to SBT 1.x HOT 2
- Using Chaos Mesh to enhance FiloDB's stability
- Google groups links in the README do not work HOT 1
- E2E benchmarking of FiloDB HOT 1
- Unify akka versions used by dependencies
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from filodb.