NebulaStream  0.6.213
NebulaStream is a data and application management framework for the internet of things
NES::Runtime::Task Class Reference

Task abstraction to bind processing (compiled binary) and data (incoming buffers @Limitations: -. More...

#include <Task.hpp>

Public Member Functions

 Task (Execution::SuccessorExecutablePipeline pipeline, TupleBuffer buf, uint64_t taskId)
 Task constructor. More...
 
constexpr Task () noexcept=default
 
ExecutionResult operator() (WorkerContext &workerContext)
 execute the task by calling executeStage of QEP and providing the stageId and the buffer More...
 
uint64_t getNumberOfTuples () const
 return the number of tuples in the working buffer More...
 
uint64_t getNumberOfInputTuples () const
 return the number of tuples in the input buffer (for statistics) More...
 
Execution::SuccessorExecutablePipeline getExecutable ()
 method to return the qep of a task More...
 
bool isReconfiguration () const
 method to check if it is a watermark-only buffer @retun bool indicating if this buffer is for watermarks only More...
 
 operator bool () const
 
bool operator! () const
 
std::string toString () const
 
uint64_t getId () const
 
TupleBuffer const & getBufferRef () const
 

Detailed Description

Task abstraction to bind processing (compiled binary) and data (incoming buffers @Limitations: -.

Constructor & Destructor Documentation

◆ Task() [1/2]

NES::Runtime::Task::Task ( Execution::SuccessorExecutablePipeline  pipeline,
TupleBuffer  buf,
uint64_t  taskId 
)
explicit

Task constructor.

Parameters
pointerto query execution plan that should be applied on the incoming buffer
idof the pipeline stage inside the QEP that should be applied
pointerto the tuple buffer that has to be process

References NES::Runtime::TupleBuffer::getNumberOfTuples().

Here is the call graph for this function:

◆ Task() [2/2]

constexpr NES::Runtime::Task::Task ( )
explicitconstexprdefaultnoexcept

Member Function Documentation

◆ getBufferRef()

TupleBuffer const & NES::Runtime::Task::getBufferRef ( ) const

This method returns the reference to the buffer of this task

Returns

Referenced by NES::Runtime::AbstractQueryManager::updateStatistics().

Here is the caller graph for this function:

◆ getExecutable()

Execution::SuccessorExecutablePipeline NES::Runtime::Task::getExecutable ( )

method to return the qep of a task

Returns

Referenced by NES::Runtime::AbstractQueryManager::completedWork(), and NES::Runtime::DynamicQueryManager::processNextTask().

Here is the caller graph for this function:

◆ getId()

uint64_t NES::Runtime::Task::getId ( ) const

◆ getNumberOfInputTuples()

uint64_t NES::Runtime::Task::getNumberOfInputTuples ( ) const

return the number of tuples in the input buffer (for statistics)

Returns
number of input tuples in input buffer

Referenced by NES::Runtime::DynamicQueryManager::processNextTask(), NES::Runtime::MultiQueueQueryManager::processNextTask(), and NES::Runtime::AbstractQueryManager::updateStatistics().

Here is the caller graph for this function:

◆ getNumberOfTuples()

uint64_t NES::Runtime::Task::getNumberOfTuples ( ) const

return the number of tuples in the working buffer

Returns
number of input tuples in working buffer

References NES::Runtime::TupleBuffer::getNumberOfTuples().

Here is the call graph for this function:

◆ isReconfiguration()

bool NES::Runtime::Task::isReconfiguration ( ) const

method to check if it is a watermark-only buffer @retun bool indicating if this buffer is for watermarks only

Referenced by NES::Runtime::AbstractQueryManager::completedWork(), NES::Runtime::DynamicQueryManager::terminateLoop(), and NES::Runtime::MultiQueueQueryManager::terminateLoop().

Here is the caller graph for this function:

◆ operator bool()

NES::Runtime::Task::operator bool ( ) const
explicit
Returns
true if this Task is valid and it is safe to execute

◆ operator!()

bool NES::Runtime::Task::operator! ( ) const
Returns
true if this Task is valid and it is safe to execute

◆ operator()()

ExecutionResult NES::Runtime::Task::operator() ( WorkerContext workerContext)

execute the task by calling executeStage of QEP and providing the stageId and the buffer

References NES::Error, NES_ERROR, and NES::Ok.

◆ toString()

std::string NES::Runtime::Task::toString ( ) const

References NES::Runtime::TupleBuffer::getBuffer(), NES::Runtime::TupleBuffer::getBufferSize(), NES::Runtime::TupleBuffer::getNumberOfTuples(), NES::Runtime::TupleBuffer::getOriginId(), and NES::Runtime::TupleBuffer::getWatermark().

Referenced by NES::Runtime::AbstractQueryManager::completedWork(), NES::Runtime::DynamicQueryManager::processNextTask(), and NES::Runtime::MultiQueueQueryManager::processNextTask().

Here is the call graph for this function:
Here is the caller graph for this function:

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