NebulaStream  0.6.213
NebulaStream is a data and application management framework for the internet of things
NES::Statistic::AbstractStatisticFormat Class Referenceabstract

An interface for parsing (reading and creating) statistics from/to a TupleBuffer. The idea is that this format is called in the StatisticSink as well as the operator handler and returns multiple statistics that are then inserted into a StatisticStorage. More...

#include <AbstractStatisticFormat.hpp>

Public Member Functions

 AbstractStatisticFormat (const Schema &schema, Runtime::MemoryLayouts::MemoryLayoutPtr memoryLayout, std::function< std::string(const std::string &)> postProcessingData, std::function< std::string(const std::string &)> preProcessingData)
 
 AbstractStatisticFormat (const std::string &qualifierNameWithSeparator, Runtime::MemoryLayouts::MemoryLayoutPtr memoryLayout, std::function< std::string(const std::string &)> postProcessingData, std::function< std::string(const std::string &)> preProcessingData)
 
virtual std::vector< HashStatisticPairreadStatisticsFromBuffer (Runtime::TupleBuffer &buffer)=0
 Reads the statistics from the buffer. More...
 
virtual std::vector< Runtime::TupleBufferwriteStatisticsIntoBuffers (const std::vector< HashStatisticPair > &statisticsPlusHashes, Runtime::BufferManager &bufferManager)=0
 Writes the statistics to the buffer. More...
 
virtual std::string toString () const =0
 
virtual ~AbstractStatisticFormat ()
 

Protected Attributes

const Runtime::MemoryLayouts::MemoryLayoutPtr memoryLayout
 
const std::string startTsFieldName
 
const std::string endTsFieldName
 
const std::string statisticHashFieldName
 
const std::string statisticTypeFieldName
 
const std::string observedTuplesFieldName
 
const std::function< std::string(const std::string &)> postProcessingData
 
const std::function< std::string(const std::string &)> preProcessingData
 

Detailed Description

An interface for parsing (reading and creating) statistics from/to a TupleBuffer. The idea is that this format is called in the StatisticSink as well as the operator handler and returns multiple statistics that are then inserted into a StatisticStorage.

Constructor & Destructor Documentation

◆ AbstractStatisticFormat() [1/2]

NES::Statistic::AbstractStatisticFormat::AbstractStatisticFormat ( const Schema schema,
Runtime::MemoryLayouts::MemoryLayoutPtr  memoryLayout,
std::function< std::string(const std::string &)>  postProcessingData,
std::function< std::string(const std::string &)>  preProcessingData 
)
explicit

◆ AbstractStatisticFormat() [2/2]

NES::Statistic::AbstractStatisticFormat::AbstractStatisticFormat ( const std::string &  qualifierNameWithSeparator,
Runtime::MemoryLayouts::MemoryLayoutPtr  memoryLayout,
std::function< std::string(const std::string &)>  postProcessingData,
std::function< std::string(const std::string &)>  preProcessingData 
)
explicit

◆ ~AbstractStatisticFormat()

NES::Statistic::AbstractStatisticFormat::~AbstractStatisticFormat ( )
virtualdefault

Member Function Documentation

◆ readStatisticsFromBuffer()

virtual std::vector<HashStatisticPair> NES::Statistic::AbstractStatisticFormat::readStatisticsFromBuffer ( Runtime::TupleBuffer buffer)
pure virtual

Reads the statistics from the buffer.

Parameters
bufferBuffer containing the
Returns
Pairs of <StatisticHash, Statistic>

Implemented in NES::Statistic::HyperLogLogStatisticFormat, and NES::Statistic::CountMinStatisticFormat.

◆ toString()

virtual std::string NES::Statistic::AbstractStatisticFormat::toString ( ) const
pure virtual

◆ writeStatisticsIntoBuffers()

virtual std::vector<Runtime::TupleBuffer> NES::Statistic::AbstractStatisticFormat::writeStatisticsIntoBuffers ( const std::vector< HashStatisticPair > &  statisticsPlusHashes,
Runtime::BufferManager bufferManager 
)
pure virtual

Writes the statistics to the buffer.

Parameters
statisticsPlusHashes
bufferManager
Returns
Vector of tuple buffers containing the sketches

Implemented in NES::Statistic::HyperLogLogStatisticFormat, and NES::Statistic::CountMinStatisticFormat.

Member Data Documentation

◆ endTsFieldName

◆ memoryLayout

◆ observedTuplesFieldName

◆ postProcessingData

◆ preProcessingData

◆ startTsFieldName

◆ statisticHashFieldName

◆ statisticTypeFieldName

const std::string NES::Statistic::AbstractStatisticFormat::statisticTypeFieldName
protected

The documentation for this class was generated from the following files: