|
NebulaStream
0.6.213
NebulaStream is a data and application management framework for the internet of things
|
Base class for all data sinks in NES. More...
#include <SinkMedium.hpp>
Public Member Functions | |
| SinkMedium (SinkFormatPtr sinkFormat, Runtime::NodeEnginePtr nodeEngine, uint32_t numOfProducers, SharedQueryId sharedQueryId, DecomposedQueryId decomposedQueryId, DecomposedQueryPlanVersion decomposedQueryVersion) | |
| public constructor for data sink More... | |
| SinkMedium (SinkFormatPtr sinkFormat, Runtime::NodeEnginePtr nodeEngine, uint32_t numOfProducers, SharedQueryId sharedQueryId, DecomposedQueryId decomposedQueryId, DecomposedQueryPlanVersion decomposedQueryVersion, uint64_t numberOfOrigins) | |
| public constructor for data sink More... | |
| virtual void | setup ()=0 |
| virtual method to setup sink @Note this method will be overwritten by derived classes More... | |
| virtual void | shutdown ()=0 |
| virtual method to shutdown sink @Note this method will be overwritten by derived classes More... | |
| virtual bool | writeData (Runtime::TupleBuffer &inputBuffer, Runtime::WorkerContext &workerContext)=0 |
| method to write a TupleBuffer More... | |
| SharedQueryId | getSharedQueryId () const |
| get the id of the owning plan More... | |
| DecomposedQueryId | getParentPlanId () const |
| get the subplan id of the owning plan More... | |
| DecomposedQueryPlanVersion | getParentPlanVersion () const |
| get the subplan version of the owning plan More... | |
| uint64_t | getNumberOfWrittenOutBuffers () |
| debug function for testing to get number of written buffers More... | |
| uint64_t | getNumberOfWrittenOutTuples () |
| debug function for testing to get number of written tuples More... | |
| virtual std::string | toString () const =0 |
| virtual function to get a string describing the particular sink @Note this function is overwritten by the particular data sink More... | |
| SchemaPtr | getSchemaPtr () const |
| method to return the current schema of the sink More... | |
| std::string | getSinkFormat () |
| method to get the format as string More... | |
| virtual SinkMediumTypes | getSinkMediumType ()=0 |
| method to return the type of medium More... | |
| void | reconfigure (Runtime::ReconfigurationMessage &message, Runtime::WorkerContext &context) override |
| void | postReconfigurationCallback (Runtime::ReconfigurationMessage &message) override |
| OperatorId | getOperatorId () const |
| Get operator id. More... | |
| void | setMigrationFlag () |
| Sets that sink is used for state migration. More... | |
| bool | isForMigration () const |
| Check whether this sink is used for state migration. More... | |
Public Member Functions inherited from NES::Runtime::Reconfigurable | |
| ~Reconfigurable () NES_NOEXCEPT(false) override=default | |
Public Member Functions inherited from NES::detail::virtual_enable_shared_from_this< Reconfigurable, false > | |
| ~virtual_enable_shared_from_this () NES_NOEXCEPT(isNoexceptDestructible) override=default | |
| std::shared_ptr< T1 > | shared_from_this () |
| std::weak_ptr< T1 > | weak_from_this () |
Public Member Functions inherited from NES::detail::virtual_enable_shared_from_this_base< isNoexceptDestructible > | |
| virtual | ~virtual_enable_shared_from_this_base () NES_NOEXCEPT(isNoexceptDestructible)=default |
Protected Attributes | |
| SinkFormatPtr | sinkFormat |
| bool | schemaWritten |
| Runtime::NodeEnginePtr | nodeEngine |
| std::atomic< uint32_t > | activeProducers |
| termination machinery More... | |
| SharedQueryId | sharedQueryId |
| DecomposedQueryId | decomposedQueryId |
| DecomposedQueryPlanVersion | decomposedQueryVersion |
| uint64_t | numberOfOrigins |
| uint64_t | sentBuffer {0} |
| uint64_t | sentTuples {0} |
| std::recursive_mutex | writeMutex |
| bool | migration {false} |
Base class for all data sinks in NES.
|
explicit |
public constructor for data sink
|
explicit |
public constructor for data sink
References NES_ASSERT2_FMT, and schemaWritten.
| uint64_t NES::SinkMedium::getNumberOfWrittenOutBuffers | ( | ) |
debug function for testing to get number of written buffers
References sentBuffer, and writeMutex.
| uint64_t NES::SinkMedium::getNumberOfWrittenOutTuples | ( | ) |
debug function for testing to get number of written tuples
References sentTuples, and writeMutex.
| OperatorId NES::SinkMedium::getOperatorId | ( | ) | const |
Get operator id.
| DecomposedQueryId NES::SinkMedium::getParentPlanId | ( | ) | const |
| DecomposedQueryPlanVersion NES::SinkMedium::getParentPlanVersion | ( | ) | const |
get the subplan version of the owning plan
References decomposedQueryVersion.
| SchemaPtr NES::SinkMedium::getSchemaPtr | ( | ) | const |
method to return the current schema of the sink
References sinkFormat.
Referenced by NES::MonitoringSink::writeData().
| SharedQueryId NES::SinkMedium::getSharedQueryId | ( | ) | const |
| std::string NES::SinkMedium::getSinkFormat | ( | ) |
|
pure virtual |
method to return the type of medium
Implemented in NES::ZmqSink, NES::Statistic::StatisticSink, NES::RawBufferSink, NES::PrintSink, NES::NullOutputSink, NES::MonitoringSink, NES::FileSink, NES::Network::NetworkSink, NES::Network::TestSink, NES::Network::TestSink, NES::CollectTestSink< Type >, and NES::TestSink.
| bool NES::SinkMedium::isForMigration | ( | ) | const |
|
overridevirtual |
| message |
Reimplemented from NES::Runtime::Reconfigurable.
References activeProducers, decomposedQueryId, decomposedQueryVersion, NES::Runtime::FailEndOfStream, NES::Runtime::Failure, NES::Runtime::ReconfigurationMessage::getType(), NES::Runtime::ReconfigurationMessage::getUserData(), NES::Runtime::Graceful, NES::Runtime::HardEndOfStream, NES::Runtime::HardStop, NES::ReconfigurationMetadata::instanceOf(), NES::Runtime::Invalid, NES_ASSERT2_FMT, NES_DEBUG, NES_NOT_IMPLEMENTED, NES_WARNING, nodeEngine, NES::Runtime::Reconfigurable::postReconfigurationCallback(), NES::Runtime::ReconfigurationMarker, NES::Runtime::reconfigurationTypeToTerminationType(), NES::detail::virtual_enable_shared_from_this< Reconfigurable, false >::shared_from_this(), shutdown(), NES::Runtime::SoftEndOfStream, and toString().
Referenced by NES::Network::NetworkSink::postReconfigurationCallback().
|
overridevirtual |
| message | |
| context |
Reimplemented from NES::Runtime::Reconfigurable.
References NES::Runtime::Reconfigurable::reconfigure().
Referenced by NES::Network::NetworkSink::reconfigure().
| void NES::SinkMedium::setMigrationFlag | ( | ) |
Sets that sink is used for state migration.
References migration.
|
pure virtual |
virtual method to setup sink @Note this method will be overwritten by derived classes
Implemented in NES::ZmqSink, NES::Statistic::StatisticSink, NES::RawBufferSink, NES::PrintSink, NES::NullOutputSink, NES::MonitoringSink, NES::FileSink, NES::Network::NetworkSink, NES::Network::TestSink, NES::Network::TestSink, NES::CollectTestSink< Type >, and NES::TestSink.
|
pure virtual |
virtual method to shutdown sink @Note this method will be overwritten by derived classes
Implemented in NES::ZmqSink, NES::Statistic::StatisticSink, NES::RawBufferSink, NES::PrintSink, NES::NullOutputSink, NES::MonitoringSink, NES::FileSink, NES::Network::NetworkSink, NES::Network::TestSink, NES::Network::TestSink, NES::CollectTestSink< Type >, and NES::TestSink.
Referenced by postReconfigurationCallback().
|
pure virtual |
virtual function to get a string describing the particular sink @Note this function is overwritten by the particular data sink
Implemented in NES::ZmqSink, NES::Statistic::StatisticSink, NES::RawBufferSink, NES::PrintSink, NES::NullOutputSink, NES::MonitoringSink, NES::FileSink, NES::Network::NetworkSink, NES::Network::TestSink, NES::Network::TestSink, NES::CollectTestSink< Type >, and NES::TestSink.
Referenced by postReconfigurationCallback().
|
pure virtual |
method to write a TupleBuffer
| a | tuple buffers pointer |
Implemented in NES::Statistic::StatisticSink, NES::Network::NetworkSink, NES::CollectTestSink< Type >, and NES::TestSink.
|
protected |
termination machinery
Referenced by postReconfigurationCallback().
|
protected |
Referenced by NES::Network::NetworkSink::configureNewSinkDescriptor(), getParentPlanId(), NES::Network::NetworkSink::onEvent(), NES::Network::NetworkSink::postReconfigurationCallback(), postReconfigurationCallback(), NES::Network::NetworkSink::preSetup(), NES::Network::NetworkSink::reconfigure(), NES::Network::NetworkSink::setup(), NES::Network::NetworkSink::shutdown(), and NES::Network::NetworkSink::writeData().
|
protected |
|
protected |
Referenced by isForMigration(), and setMigrationFlag().
|
protected |
|
protected |
|
protected |
Referenced by NES::FileSink::setup(), SinkMedium(), NES::FileSink::writeData(), and NES::ZmqSink::writeData().
|
protected |
Referenced by getNumberOfWrittenOutBuffers(), and NES::ZmqSink::writeData().
|
protected |
Referenced by getNumberOfWrittenOutTuples().
|
protected |
|
protected |
Referenced by getSchemaPtr(), getSinkFormat(), NES::FileSink::setup(), NES::FileSink::toString(), NES::MonitoringSink::toString(), NES::PrintSink::toString(), NES::ZmqSink::toString(), NES::Network::NetworkSink::writeData(), NES::FileSink::writeData(), NES::PrintSink::writeData(), and NES::ZmqSink::writeData().
|
protected |