NebulaStream
0.6.213
NebulaStream is a data and application management framework for the internet of things
|
#include <ExplainRequest.hpp>
Public Member Functions | |
ExplainRequest (const QueryPlanPtr &queryPlan, const Optimizer::PlacementStrategy queryPlacementStrategy, const uint8_t maxRetries, const z3::ContextPtr &z3Context) | |
Constructor. More... | |
![]() | |
AbstractUniRequest (const std::vector< ResourceType > &requiredResources, uint8_t maxRetries) | |
constructor More... | |
std::vector< AbstractRequestPtr > | execute (const StorageHandlerPtr &storageHandle) final |
Acquires locks on the needed resources and executes the request logic. More... | |
![]() | |
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< AbstractRequestPtr > | handleError (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< AbstractRequestResponsePtr > | getFuture () |
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< RequestType > | as () |
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< AbstractRequestPtr > | rollBack (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< AbstractRequestPtr > | executeRequestLogic (const StorageHandlerPtr &storageHandler) override |
Executes the request logic. More... | |
void | assignOperatorIds (const QueryPlanPtr &queryPlan) |
Assign new operator ids to the input query plan. More... | |
![]() | |
RequestId | getResourceLockingId () override |
get an id that identifies this object to lock resources for exclusive use by this object More... | |
![]() | |
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... | |
![]() | |
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 | |
![]() | |
RequestId | requestId {INVALID_REQUEST_ID} |
std::promise< AbstractRequestResponsePtr > | responsePromise |
NES::RequestProcessor::ExplainRequest::ExplainRequest | ( | const QueryPlanPtr & | queryPlan, |
const Optimizer::PlacementStrategy | queryPlacementStrategy, | ||
const uint8_t | maxRetries, | ||
const z3::ContextPtr & | z3Context | ||
) |
Constructor.
queryPlan | the query plan |
queryPlacementStrategy | the placement strategy |
maxRetries | Maximum number of retry attempts for the request |
z3Context | The 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.
|
protected |
Assign new operator ids to the input query plan.
queryPlan | : the input query plan |
Referenced by executeRequestLogic().
|
static |
creates a new AddQueryRequest object
queryPlan | the query plan |
queryPlacementStrategy | the placement strategy |
maxRetries | Maximum number of retry attempts for the request |
z3Context | The z3 context to be used for the request, needed for query merging phase |
Referenced by NES::RequestHandlerService::validateAndQueueExplainQueryRequest().
|
overrideprotectedvirtual |
Executes the request logic.
storageHandler | a handle to access the coordinators data structures which might be needed for executing the request |
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.
|
overrideprotectedvirtual |
Performs request specific error handling to be done after changes to the storage are rolled back.
ex | The exception encountered |
storageHandler | The storage access handle used by the request |
Implements NES::RequestProcessor::AbstractRequest.
|
overrideprotectedvirtual |
Performs request specific error handling to be done before changes to the storage are rolled back.
ex | The exception encountered |
storageHandler | The storage access handle used by the request |
Implements NES::RequestProcessor::AbstractRequest.
|
overrideprotectedvirtual |
Roll back any changes made by a request that did not complete due to errors.
ex | The exception thrown during request execution. |
storageHandle | The storage access handle that was used by the request to modify the system state. |
Implements NES::RequestProcessor::AbstractRequest.