Akumuli
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends
Classes | Typedefs | Enumerations | Functions | Variables
Akumuli Namespace Reference

Classes

struct  BitHacks
 
struct  ChunkCache
 
class  CursorFSM
 
struct  ExternalCursor
 
struct  Cursor
 Combined cursor interface. More...
 
struct  CoroCursorStackAllocator
 
struct  CoroCursor
 
struct  BadDateTimeFormat
 
struct  DateTimeUtil
 Static utility class for date-time utility functions. More...
 
struct  HashFnFamily
 Family of 4-universal hash functions. More...
 
struct  InternalCursor
 
struct  TwoUnivHashFnFamily
 
struct  Postings
 
struct  InvertedIndex
 
class  Logger
 
struct  LightweightString
 
struct  AprHandleDeleter
 APR DBD handle deleter. More...
 
struct  MetadataStorage
 
struct  SearchAlgorithm
 
struct  aku_EntryIndexRecord
 Entry index record. More...
 
struct  CompressedChunkDesc
 
struct  aku_Entry
 
struct  SearchStats
 
class  PageHeader
 
struct  SearchRange
 
struct  InterpolationSearch
 
struct  TimeOrderMergePredicate
 
struct  TimeOrderMergePredicate< TKey, AKU_CURSOR_DIR_FORWARD >
 
struct  TimeOrderMergePredicate< TKey, AKU_CURSOR_DIR_BACKWARD >
 
struct  ChunkOrderMergePredicate
 
struct  ChunkOrderMergePredicate< std::tuple< TKey, int >, AKU_CURSOR_DIR_FORWARD >
 
struct  RunIter
 
struct  RunIter< std::shared_ptr< TRun >, AKU_CURSOR_DIR_FORWARD >
 
struct  RunIter< std::shared_ptr< TRun >, AKU_CURSOR_DIR_BACKWARD >
 
struct  TimeSeriesValue
 
struct  Sequencer
 Akumuli can accept unordered time-series (this is the case when clocks of the different time-series sources are slightly out of sync). This component accepts all of them, filter out late writes and reorder all the remaining samples by timestamp and parameter id. More...
 
struct  SeriesMatcher
 
struct  SeriesParser
 
struct  VolumeIterator
 
struct  SearchError
 
struct  TerminalNode
 
struct  Volume
 
struct  Storage
 
struct  StringPoolOffset
 Offset inside string-pool. More...
 
struct  StringPool
 
struct  StringTools
 
struct  AprException
 
struct  Exception
 
class  MemoryMappedFile
 
class  PageInfo
 
class  Rand
 
class  RWLock
 
class  Expected
 
struct  AkumuliCursor
 Abstraction layer above aku_Cursor. More...
 
struct  DbCursor
 Abstraction layer above aku_Cursor. More...
 
struct  DbConnection
 Abstraction layer above aku_Database. More...
 
class  AkumuliConnection
 Object of this class writes everything to the database. More...
 
struct  PipelineSpout
 
class  IngestionPipeline
 
class  Formatter
 
struct  ProtocolConsumer
 
struct  PDU
 
struct  ProtocolParserError
 
struct  EStopIteration
 Stop iteration exception. More...
 
class  ProtocolParser
 
struct  CSVOutputFormatter
 
struct  RESPOutputFormatter
 RESP output implementation. More...
 
struct  OutputFormatter
 Output formatter interface. More...
 
struct  QueryResultsPooler
 
struct  QueryProcessor
 
struct  RESPError
 
struct  RESPStream
 
struct  ServerSettings
 
struct  ReadOperation
 
struct  ReadOperationBuilder
 Interface that can be used to create read operations. More...
 
struct  Server
 Server interface. More...
 
struct  ServerFactory
 
struct  SignalHandler
 
class  StreamError
 
struct  ByteStreamReader
 
class  MemStreamReader
 
struct  TcpServerBuilder
 
class  TcpSession
 
class  TcpAcceptor
 
struct  TcpServer
 
struct  UdpServerBuilder
 
class  UdpServer
 
struct  UncompressedChunk
 
struct  ChunkWriter
 
class  Base128Int
 Base 128 encoded integer. More...
 
struct  Base128StreamWriter
 Base128 encoder. More...
 
struct  Base128StreamReader
 Base128 decoder. More...
 
struct  ZigZagStreamWriter
 
struct  ZigZagStreamReader
 
struct  DeltaStreamWriter
 
struct  DeltaStreamReader
 
struct  DeltaDeltaStreamWriter
 
struct  DeltaDeltaStreamReader
 
struct  RLEStreamWriter
 
struct  RLEStreamReader
 
struct  FcmPredictor
 
struct  DfcmPredictor
 
struct  FcmStreamWriter
 
struct  FcmStreamReader
 
struct  SeriesSlice
 SeriesSlice represents consiquent data points from one series. More...
 
struct  CompressionUtil
 

Typedefs

typedef std::chrono::nanoseconds DurationT
 1ns interval
 
using aku_Duration = aku_Timestamp
 
typedef
boost::coroutines::coroutine
< void(InternalCursor *)> 
Coroutine
 
typedef Coroutine::caller_type Caller
 
typedef std::function< void(aku_Status,
uint64_t)> 
PipelineErrorCb
 Callback from pipeline to session.
 
typedef char Byte
 
typedef boost::asio::io_service IOServiceT
 
typedef
boost::asio::ip::tcp::acceptor 
AcceptorT
 
typedef
boost::asio::ip::tcp::socket 
SocketT
 
typedef
boost::asio::ip::tcp::endpoint 
EndpointT
 
typedef boost::asio::strand StrandT
 
typedef
boost::asio::io_service::work 
WorkT
 
typedef std::vector< unsigned
char > 
ByteVector
 
typedef FcmPredictor PredictorT
 
typedef RLEStreamWriter< uint32_t > RLELenWriter
 
typedef RLEStreamReader< uint32_t > RLELenReader
 
typedef RLEStreamWriter< int64_t > __RLEWriter
 
typedef ZigZagStreamWriter
< __RLEWriter, int64_t > 
__ZigZagWriter
 
typedef DeltaStreamWriter
< __ZigZagWriter, int64_t > 
ZDeltaRLEWriter
 
typedef RLEStreamReader< int64_t > __RLEReader
 
typedef ZigZagStreamReader
< __RLEReader, int64_t > 
__ZigZagReader
 
typedef DeltaStreamReader
< __ZigZagReader, int64_t > 
ZDeltaRLEReader
 
typedef DeltaStreamWriter
< RLEStreamWriter< uint64_t >
, uint64_t > 
DeltaRLEWriter
 
typedef DeltaStreamReader
< RLEStreamReader< uint64_t >
, uint64_t > 
DeltaRLEReader
 

Enumerations

enum  BackoffPolicy { AKU_THROTTLE, AKU_LINEAR_BACKOFF }
 

Functions

std::ostream & operator<< (std::ostream &st, aku_Sample res)
 
void delete_apr_pool (apr_pool_t *p)
 Delete apr pool.
 
std::ostream & operator<< (std::ostream &s, LightweightString val)
 
SearchStatsget_global_search_stats ()
 
struct
Akumuli::aku_EntryIndexRecord 
__attribute__ ((packed))
 
template<typename RunType >
bool top_element_less (const RunType &x, const RunType &y)
 
template<typename RunType >
bool top_element_more (const RunType &x, const RunType &y)
 
bool operator< (TimeSeriesValue const &lhs, TimeSeriesValue const &rhs)
 
bool chunk_order_LT (TimeSeriesValue const &lhs, TimeSeriesValue const &rhs)
 
std::ostream & operator<< (std::ostream &str, TimeSeriesValue const &val)
 
template<class Cont >
void wrlock_all (Cont &cont)
 
template<class Cont >
void unlock_all (Cont &cont)
 
template<template< class PredKey, int PredDirection > class Predicate, int dir, class Consumer >
void kway_merge (vector< Sequencer::PSortedRun > &runs, Consumer &cons)
 
template<typename TIter , typename TComp >
void insertion_sort (TIter begin, TIter end, TComp const &cmp)
 
std::string apr_error_message (apr_status_t status)
 
void set_panic_handler (aku_panic_handler_t new_panic_handler)
 
std::ostream & operator<< (std::ostream &str, AprException const &e)
 
std::ostream & operator<< (std::ostream &str, Exception const &e)
 
int64_t log2 (int64_t value)
 Fast integer logarithm.
 
const void * align_to_page (const void *ptr, size_t page_size)
 
void * align_to_page (void *ptr, size_t page_size)
 
void prefetch_mem (const void *ptr, size_t mem_size)
 
size_t get_page_size ()
 
std::tuple< bool, aku_Status > page_in_core (const void *addr)
 
RWLock::RWLock() if (error)
 
template<class StreamType , class Fn >
aku_Status write_to_stream (Base128StreamWriter &stream, const Fn &writer)
 
template<class Stream , class Fn >
void read_from_stream (Base128StreamReader &reader, const Fn &func)
 
template<class Fn >
bool reorder_chunk_header (UncompressedChunk const &header, UncompressedChunk *out, Fn const &f)
 

Variables

struct Akumuli::SearchStats __attribute__
 

Detailed Description

Copyright (c) 2013 Eugene Lazin 4lazi.nosp@m.n@gm.nosp@m.ail.c.nosp@m.om

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

PRIVATE HEADER

Data structures for main memory storage.

Copyright (c) 2013 Eugene Lazin 4lazi.nosp@m.n@gm.nosp@m.ail.c.nosp@m.om

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright (c) 2015 Eugene Lazin 4lazi.nosp@m.n@gm.nosp@m.ail.c.nosp@m.om

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Logging interface for the library.

PRIVATE HEADER

Data structures for main memory storage.

Copyright (c) 2015 Eugene Lazin 4lazi.nosp@m.n@gm.nosp@m.ail.c.nosp@m.om

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

PRIVATE HEADER

Sort alrgorithms for akumuli.

Copyright (c) 2013 Eugene Lazin 4lazi.nosp@m.n@gm.nosp@m.ail.c.nosp@m.om

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

PRIVATE HEADER

Page management API.

Copyright (c) 2013 Eugene Lazin 4lazi.nosp@m.n@gm.nosp@m.ail.c.nosp@m.om

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

PRIVATE HEADER

Utils

Copyright (c) 2013 Eugene Lazin 4lazi.nosp@m.n@gm.nosp@m.ail.c.nosp@m.om

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright (c) 2014 Eugene Lazin 4lazi.nosp@m.n@gm.nosp@m.ail.c.nosp@m.om

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

PRIVATE HEADER

Compression algorithms

Copyright (c) 2013 Eugene Lazin 4lazi.nosp@m.n@gm.nosp@m.ail.c.nosp@m.om

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Function Documentation

std::string Akumuli::apr_error_message ( apr_status_t  status)

APR error converter

template<typename TIter , typename TComp >
void Akumuli::insertion_sort ( TIter  begin,
TIter  end,
TComp const &  cmp 
)

Insertion sort implementation.

Parameters
TIterrandom access iterator type
TCompcompare predicate (work on values, not on iterators)
template<template< class PredKey, int PredDirection > class Predicate, int dir, class Consumer >
void Akumuli::kway_merge ( vector< Sequencer::PSortedRun > &  runs,
Consumer &  cons 
)

Merge sequences and push it to consumer

void Akumuli::set_panic_handler ( aku_panic_handler_t  new_panic_handler)

Set global panic handler

template<class StreamType , class Fn >
aku_Status Akumuli::write_to_stream ( Base128StreamWriter &  stream,
const Fn &  writer 
)

NOTE:

Data should be ordered by paramid and timestamp.

Chunk format: chunk size - uint32 - total number of bytes in the chunk nelements - uint32 - total number of elements in the chunk paramid stream: stream size - uint32 - number of bytes in a stream body - array timestamp stream: stream size - uint32 - number of bytes in a stream body - array payload stream: ncolumns - number of columns stored (for future use) column[0]: double stream: stream size - uint32 bytes: