object GorillaSuperBlock extends Serializable
A GorillaSuperBlock is a binary format for storing a long io.sqooba.oss.timeseries.TimeSeries composed of many GorillaBlocks. It uses a sequential layout with an index to permit quick look-up of individual blocks by timestamp.
GorillaSuperBlock Format +-------+-------+ ... +----- -+-------+---+----------+---+
block | block |
| block | Index | L | Thrift | L |
---|
+-------+-------+ ... +-------+-------+---+----------+---+
LT: length of Thrift block, LI: length of index
The Gorilla blocks are lined up one after another, ordered by timestamp. They all have different lengths that can be recovered from the offsets stored in the index.
At the end of the stream there is a footer composed of an additional Gorilla array containing the index and a block of thrift managed metadata. The index maps the start timestamp of each GorillaBlock to its offset from the beginning of the blob (in bytes). The last entry in the index points to the start of the footer.
The lengths of the index and of the thrift block are written as 4 byte integers just after the respective blocks. In that manner a user can first read the footer, decode the index and then do fast look-ups for blocks by timestamp.
- Alphabetic
- By Inheritance
- GorillaSuperBlock
- Serializable
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Type Members
- class Writer[B <: GorillaBlock] extends AutoCloseable
A 'mutable.Growable' for the iterative writing of a GorillaSuperBlock.
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##(): Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- val VERSION_NUMBER: Int
Specifies the version number of this binary format
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- def write[B <: GorillaBlock](buckets: Seq[TSEntry[B]], output: OutputStream): Unit
Writes the provided TSEntries of Gorilla blocks to the provided output stream according to the GorillaSuperBlock format.
Writes the provided TSEntries of Gorilla blocks to the provided output stream according to the GorillaSuperBlock format.
- buckets
well-formed stream of entries containing Gorilla blocks
- output
the stream to write to