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

#include <ExplainRequest.hpp>

Collaboration diagram for NES::RequestProcessor::ExplainRequest:
[legend]

Public Member Functions

 ExplainRequest (const QueryPlanPtr &queryPlan, const Optimizer::PlacementStrategy queryPlacementStrategy, const uint8_t maxRetries, const z3::ContextPtr &z3Context)
 Constructor. More...
 
- Public Member Functions inherited from NES::RequestProcessor::AbstractUniRequest
 AbstractUniRequest (const std::vector< ResourceType > &requiredResources, uint8_t maxRetries)
 constructor More...
 
std::vector< AbstractRequestPtrexecute (const StorageHandlerPtr &storageHandle) final
 Acquires locks on the needed resources and executes the request logic. More...
 
- Public Member Functions inherited from NES::RequestProcessor::AbstractRequest
 AbstractRequest (uint8_t maxRetries)
 constructor More...
 
void setId (RequestId requestId)
 set the id of this object. This has to be done before any resource is locked. More...
 
std::vector< AbstractRequestPtrhandleError (const std::exception_ptr &ex, const StorageHandlerPtr &storageHandle)
 Calls rollBack and executes additional error handling based on the exception if necessary. More...
 
bool retry ()
 Check if the request has already reached the maximum allowed retry attempts or if it can be retried again. If the maximum is not reached yet, increase the amount of recorded actual retries. More...
 
std::future< AbstractRequestResponsePtrgetFuture ()
 creates a future which will contain the response supplied by this request More...
 
virtual ~AbstractRequest ()=default
 destructor More...
 
template<class RequestType >
bool instanceOf ()
 Checks if this object is of type AbstractRequest. More...
 
template<class RequestType >
std::shared_ptr< RequestTypeas ()
 Dynamically casts the exception to the given type. More...
 

Static Public Member Functions

static ExplainRequestPtr create (const QueryPlanPtr &queryPlan, const Optimizer::PlacementStrategy queryPlacementStrategy, const uint8_t maxRetries, const z3::ContextPtr &z3Context)
 creates a new AddQueryRequest object More...
 

Protected Member Functions

void preRollbackHandle (std::exception_ptr ex, const StorageHandlerPtr &storageHandler) override
 Performs request specific error handling to be done before changes to the storage are rolled back. More...
 
std::vector< AbstractRequestPtrrollBack (std::exception_ptr ex, const StorageHandlerPtr &storageHandle) override
 Roll back any changes made by a request that did not complete due to errors. More...
 
void postRollbackHandle (std::exception_ptr ex, const StorageHandlerPtr &storageHandler) override
 Performs request specific error handling to be done after changes to the storage are rolled back. More...
 
std::vector< AbstractRequestPtrexecuteRequestLogic (const StorageHandlerPtr &storageHandler) override
 Executes the request logic. More...
 
void assignOperatorIds (const QueryPlanPtr &queryPlan)
 Assign new operator ids to the input query plan. More...
 
- Protected Member Functions inherited from NES::RequestProcessor::AbstractUniRequest
RequestId getResourceLockingId () override
 get an id that identifies this object to lock resources for exclusive use by this object More...
 
- Protected Member Functions inherited from NES::RequestProcessor::AbstractRequest
void trySetExceptionInPromise (std::exception_ptr exception)
 if no exception or value has been set in this requests response promise yet, set the supplied exception. If a value has already been set, this method has no effect More...
 
void setExceptionInPromiseOrRethrow (std::exception_ptr exception)
 set and exception on the response promise if no value or exception has been set yet. If the promise already has a value or exception set, rethrow the exception in thsi thread More...
 
- Protected Member Functions inherited from NES::RequestProcessor::StorageResourceLocker
 StorageResourceLocker (std::vector< ResourceType > requiredResources)
 Constructor. More...
 
virtual void preExecution (const StorageHandlerPtr &storageHandle)
 Performs steps to be done before execution of the request logic, e.g. locking the required data structures. More...
 
virtual void postExecution (const StorageHandlerPtr &storageHandle)
 Performs steps to be done after execution of the request logic, e.g. unlocking the required data structures. More...
 

Additional Inherited Members

- Protected Attributes inherited from NES::RequestProcessor::AbstractRequest
RequestId requestId {INVALID_REQUEST_ID}
 
std::promise< AbstractRequestResponsePtrresponsePromise
 

Constructor & Destructor Documentation

◆ ExplainRequest()

NES::RequestProcessor::ExplainRequest::ExplainRequest ( const QueryPlanPtr queryPlan,
const Optimizer::PlacementStrategy  queryPlacementStrategy,
const uint8_t  maxRetries,
const z3::ContextPtr z3Context 
)

Constructor.

Parameters
queryPlanthe query plan
queryPlacementStrategythe placement strategy
maxRetriesMaximum number of retry attempts for the request
z3ContextThe z3 context to be used for the request, needed for query merging phase

References NES::RequestProcessor::CoordinatorConfiguration, NES::RequestProcessor::GlobalExecutionPlan, NES::RequestProcessor::GlobalQueryPlan, NES::RequestProcessor::QueryCatalogService, NES::RequestProcessor::SourceCatalog, NES::RequestProcessor::StatisticProbeHandler, NES::RequestProcessor::Topology, and NES::RequestProcessor::UdfCatalog.

Member Function Documentation

◆ assignOperatorIds()

void NES::RequestProcessor::ExplainRequest::assignOperatorIds ( const QueryPlanPtr queryPlan)
protected

Assign new operator ids to the input query plan.

Parameters
queryPlan: the input query plan

Referenced by executeRequestLogic().

Here is the caller graph for this function:

◆ create()

ExplainRequestPtr NES::RequestProcessor::ExplainRequest::create ( const QueryPlanPtr queryPlan,
const Optimizer::PlacementStrategy  queryPlacementStrategy,
const uint8_t  maxRetries,
const z3::ContextPtr z3Context 
)
static

creates a new AddQueryRequest object

Parameters
queryPlanthe query plan
queryPlacementStrategythe placement strategy
maxRetriesMaximum number of retry attempts for the request
z3ContextThe z3 context to be used for the request, needed for query merging phase

Referenced by NES::RequestHandlerService::validateAndQueueExplainQueryRequest().

Here is the caller graph for this function:

◆ executeRequestLogic()

std::vector< AbstractRequestPtr > NES::RequestProcessor::ExplainRequest::executeRequestLogic ( const StorageHandlerPtr storageHandler)
overrideprotectedvirtual

Executes the request logic.

Parameters
storageHandlera handle to access the coordinators data structures which might be needed for executing the request
Returns
a list of follow up requests to be executed (can be empty if no further actions are required)

Implements NES::RequestProcessor::AbstractUniRequest.

References assignOperatorIds(), NES::Optimizer::SampleCodeGenerationPhase::create(), NES::Optimizer::SemanticQueryValidation::create(), NES::Optimizer::SyntacticQueryValidation::create(), magic_enum::enum_name(), NES::EXPLAINED, NES::RequestProcessor::AbstractRequest::handleError(), NES::MARKED_FOR_DEPLOYMENT, NES::MARKED_FOR_MIGRATION, NES::MARKED_FOR_REDEPLOYMENT, backward::details::move(), NES_DEBUG, NES_ERROR, NES_WARNING, NES::OPTIMIZING, NES::REGISTERED, NES::RequestProcessor::AbstractRequest::requestId, NES::RequestProcessor::AbstractRequest::responsePromise, NES::RUNNING, NES::STOPPED, and NES::StopQuery.

Here is the call graph for this function:

◆ postRollbackHandle()

void NES::RequestProcessor::ExplainRequest::postRollbackHandle ( std::exception_ptr  ex,
const StorageHandlerPtr storageHandler 
)
overrideprotectedvirtual

Performs request specific error handling to be done after changes to the storage are rolled back.

Parameters
exThe exception encountered
storageHandlerThe storage access handle used by the request

Implements NES::RequestProcessor::AbstractRequest.

◆ preRollbackHandle()

void NES::RequestProcessor::ExplainRequest::preRollbackHandle ( std::exception_ptr  ex,
const StorageHandlerPtr storageHandler 
)
overrideprotectedvirtual

Performs request specific error handling to be done before changes to the storage are rolled back.

Parameters
exThe exception encountered
storageHandlerThe storage access handle used by the request

Implements NES::RequestProcessor::AbstractRequest.

◆ rollBack()

std::vector< AbstractRequestPtr > NES::RequestProcessor::ExplainRequest::rollBack ( std::exception_ptr  ex,
const StorageHandlerPtr storageHandle 
)
overrideprotectedvirtual

Roll back any changes made by a request that did not complete due to errors.

Parameters
exThe exception thrown during request execution.
storageHandleThe storage access handle that was used by the request to modify the system state.
Returns
a list of follow up requests to be executed (can be empty if no further actions are required)

Implements NES::RequestProcessor::AbstractRequest.


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