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

This class represents a reconfiguration marker that passes through currently deployed versions of decomposed query plans and transforms them. To this end, a reconfiguration marker contains a collection of instructions for different decomposed query plans to allow the transformation. This information is wrapped together in a map. More...

#include <ReconfigurationMarker.hpp>

Public Member Functions

 ReconfigurationMarker ()=default
 
std::optional< ReconfigurationMarkerEventPtrgetReconfigurationEvent (DecomposedQueryIdWithVersion decomposedQueryIdWithVersion) const
 Get the reconfiguration marker event. More...
 
void addReconfigurationEvent (DecomposedQueryId decomposedQueryId, DecomposedQueryPlanVersion decomposedQueryVersion, const ReconfigurationMarkerEventPtr reconfigurationEvent)
 Add a reconfiguration marker event. More...
 
void addReconfigurationEvent (DecomposedQueryIdWithVersion decomposedQueryIdWithVersion, const ReconfigurationMarkerEventPtr reconfigurationEvent)
 Add a reconfiguration marker event. More...
 
const std::unordered_map< DecomposedQueryIdWithVersion, ReconfigurationMarkerEventPtr > & getAllReconfigurationMarkerEvents () const
 Get all reconfiguration marker events defined in the reconfiguration marker. More...
 

Static Public Member Functions

static ReconfigurationMarkerPtr create ()
 

Detailed Description

This class represents a reconfiguration marker that passes through currently deployed versions of decomposed query plans and transforms them. To this end, a reconfiguration marker contains a collection of instructions for different decomposed query plans to allow the transformation. This information is wrapped together in a map.

The following information is provided within a reconfiguration marker:

Key (Who): represents identity of the decomposed query plan that needs to react upon receiving the reconfiguration marker. The key is composed of WorkerId, SharedQueryId, and DecomposedQueryId.

State (What): represents what need to be done upon receiving the reconfiguration marker. Currently we support: (1.) Draining a decomposed plan (terminate a plan), (2.) Updating a decomposed plan (plan mutation), and (3.) Updating and then draining a decomposed plan (plan termination post state migration).

Reconfiguration Metadata (How): represent necessary information on how to perform the reconfiguration.

The "What" and "How" are represented together as ReconfigurationMarkerEvent.

Constructor & Destructor Documentation

◆ ReconfigurationMarker()

NES::ReconfigurationMarker::ReconfigurationMarker ( )
default

Member Function Documentation

◆ addReconfigurationEvent() [1/2]

void NES::ReconfigurationMarker::addReconfigurationEvent ( DecomposedQueryId  decomposedQueryId,
DecomposedQueryPlanVersion  decomposedQueryVersion,
const ReconfigurationMarkerEventPtr  reconfigurationEvent 
)

Add a reconfiguration marker event.

Parameters
decomposedQueryId: key identifying the decomposed query plan id
decomposedQueryVersion: key identifying the decomposed query plan version
reconfigurationEvent: the reconfiguration marker event

◆ addReconfigurationEvent() [2/2]

void NES::ReconfigurationMarker::addReconfigurationEvent ( DecomposedQueryIdWithVersion  decomposedQueryIdWithVersion,
const ReconfigurationMarkerEventPtr  reconfigurationEvent 
)

Add a reconfiguration marker event.

Parameters
decomposedQueryId: key identifying the decomposed query plan id and version
reconfigurationEvent: the reconfiguration marker event

◆ create()

ReconfigurationMarkerPtr NES::ReconfigurationMarker::create ( )
static

Referenced by NES::Optimizer::PlacementAmendmentInstance::execute(), and TEST_F().

Here is the caller graph for this function:

◆ getAllReconfigurationMarkerEvents()

const std::unordered_map< DecomposedQueryIdWithVersion, ReconfigurationMarkerEventPtr > & NES::ReconfigurationMarker::getAllReconfigurationMarkerEvents ( ) const

Get all reconfiguration marker events defined in the reconfiguration marker.

◆ getReconfigurationEvent()

std::optional< ReconfigurationMarkerEventPtr > NES::ReconfigurationMarker::getReconfigurationEvent ( DecomposedQueryIdWithVersion  decomposedQueryIdWithVersion) const

Get the reconfiguration marker event.

Parameters
decomposedQueryId: the id and version for which the reconfiguration marker needs to be defined
Returns
optional immutable reconfiguration marker event

References NES::DecomposedQueryIdWithVersion::id, NES_DEBUG, and NES::DecomposedQueryIdWithVersion::version.


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