|
NebulaStream
0.6.213
NebulaStream is a data and application management framework for the internet of things
|
#include <WorkerRPCClient.hpp>
Classes | |
| struct | AsyncClientCall |
Public Member Functions | |
| bool | registerDecomposedQuery (const std::string &address, const DecomposedQueryPlanPtr &decomposedQueryPlan) |
| register a query More... | |
| void | registerDecomposedQueryAsync (const std::string &address, const DecomposedQueryPlanPtr &decomposedQueryPlan, const CompletionQueuePtr &cq) |
| register a query asynchronously More... | |
| bool | unregisterDecomposedQuery (const std::string &address, SharedQueryId sharedQueryId, DecomposedQueryId decomposedQueryId) |
| unregisters a decomposed query More... | |
| void | unregisterDecomposedQueryAsync (const std::string &address, SharedQueryId sharedQueryId, DecomposedQueryId decomposedQueryId, const CompletionQueuePtr &cq) |
| un-registers a decomposed query asynchronously More... | |
| bool | startDecomposedQuery (const std::string &address, SharedQueryId sharedQueryId, DecomposedQueryId decomposedQueryId) |
| method to start a already deployed decomposed query More... | |
| void | startDecomposedQueryAsync (const std::string &address, SharedQueryId sharedQueryId, DecomposedQueryId decomposedQueryId, const CompletionQueuePtr &cq) |
| method to start a already deployed query asynchronously More... | |
| bool | stopDecomposedQuery (const std::string &address, SharedQueryId sharedQueryId, DecomposedQueryId decomposedQueryId, Runtime::QueryTerminationType terminationType) |
| method to stop a query More... | |
| void | stopDecomposedQueryAsync (const std::string &address, SharedQueryId sharedQueryId, DecomposedQueryId decomposedQueryId, Runtime::QueryTerminationType terminationType, const CompletionQueuePtr &cq) |
| method to stop a query asynchronously More... | |
| void | addReconfigurationMarker (const std::string &address, const SharedQueryId &sharedQueryId, const DecomposedQueryId &decomposedQueryId, const ReconfigurationMarkerPtr &reconfigurationMarker, const CompletionQueuePtr &cq) |
| method to send reconfiguration marker to the worker for specific decomposed query plan More... | |
| bool | registerMonitoringPlan (const std::string &address, const Monitoring::MonitoringPlanPtr &plan) |
| Registers to a remote worker node its monitoring plan. More... | |
| std::string | requestMonitoringData (const std::string &address) |
| Requests from a remote worker node its monitoring data. More... | |
| bool | bufferData (const std::string &address, DecomposedQueryId decomposedQueryId, uint64_t uniqueNetworkSinDescriptorId) |
| Requests remote worker to start buffering data on a single NetworkSink identified by a query sub plan Id and a global sinkId. Once buffering starts, the Network Sink no longer sends data downstream. More... | |
| bool | updateNetworkSink (const std::string &address, uint64_t newNodeId, const std::string &newHostname, uint32_t newPort, DecomposedQueryId decomposedQueryId, uint64_t uniqueNetworkSinDescriptorId) |
| requests a remote worker to reconfigure a NetworkSink so that the NetworkSink changes where it sends data to (changes downstream node) More... | |
| void | checkAsyncResult (const std::vector< RpcAsyncRequest > &rpcAsyncRequests) |
| This functions loops over all queues and wait for the async calls return. More... | |
| bool | injectEpochBarrier (uint64_t timestamp, uint64_t queryId, const std::string &address) |
| method to propagate new epoch timestamp to source More... | |
| bool | checkHealth (const std::string &address, std::string healthServiceName) |
| method to check the health of the worker More... | |
| NES::Spatial::DataTypes::Experimental::Waypoint | getWaypoint (const std::string &address) |
| method to check the location of any node. If the node is a mobile node, its current location will be returned. If the node is a field node, its fixed location will be returned. If the node does not have a known location, an invalid location will be returned More... | |
Static Public Member Functions | |
| static WorkerRPCClientPtr | create () |
| Create instance of worker rpc client. More... | |
| void NES::WorkerRPCClient::addReconfigurationMarker | ( | const std::string & | address, |
| const SharedQueryId & | sharedQueryId, | ||
| const DecomposedQueryId & | decomposedQueryId, | ||
| const ReconfigurationMarkerPtr & | reconfigurationMarker, | ||
| const CompletionQueuePtr & | cq | ||
| ) |
method to send reconfiguration marker to the worker for specific decomposed query plan
| address | address of the worker |
| sharedQueryId | the shared query id |
| decomposedQueryId | the decomposed query id |
| reconfigurationMarker | the reconfiguration marker |
| cq | the completion queue of grpc server |
References NES::NESStrongType< T, Tag, invalid, initial >::getRawValue(), and NES::ReconfigurationMarkerSerializationUtil::serialize().
| bool NES::WorkerRPCClient::bufferData | ( | const std::string & | address, |
| DecomposedQueryId | decomposedQueryId, | ||
| uint64_t | uniqueNetworkSinDescriptorId | ||
| ) |
Requests remote worker to start buffering data on a single NetworkSink identified by a query sub plan Id and a global sinkId. Once buffering starts, the Network Sink no longer sends data downstream.
| ipAddress | |
| decomposedQueryId | : the id of the query sub plan to which the Network Sink belongs |
| uniqueNetworkSinDescriptorId | : unique id of the network sink descriptor. Used to find the Network Sink to buffer data on. |
References NES::NESStrongType< T, Tag, invalid, initial >::getRawValue(), NES_DEBUG, and NES_ERROR.
| void NES::WorkerRPCClient::checkAsyncResult | ( | const std::vector< RpcAsyncRequest > & | rpcAsyncRequests | ) |
This functions loops over all queues and wait for the async calls return.
| rpcAsyncRequests | rpc requests made |
| RpcException | Creates RPC exception with failedRPCCalls and mode |
References NES_DEBUG, NES_NOT_IMPLEMENTED, NES::Register, NES::Start, NES::WorkerRPCClient::AsyncClientCall< ReplayType >::status, NES::Stop, and NES::Unregister.
| bool NES::WorkerRPCClient::checkHealth | ( | const std::string & | address, |
| std::string | healthServiceName | ||
| ) |
|
static |
Create instance of worker rpc client.
Referenced by NES::Spatial::TEST_F().
| Spatial::DataTypes::Experimental::Waypoint NES::WorkerRPCClient::getWaypoint | ( | const std::string & | address | ) |
method to check the location of any node. If the node is a mobile node, its current location will be returned. If the node is a field node, its fixed location will be returned. If the node does not have a known location, an invalid location will be returned
| address | the ip address of the node |
References NES::Spatial::DataTypes::Experimental::Waypoint::invalid(), NES_DEBUG, and timestamp.
| bool NES::WorkerRPCClient::injectEpochBarrier | ( | uint64_t | timestamp, |
| uint64_t | queryId, | ||
| const std::string & | address | ||
| ) |
| bool NES::WorkerRPCClient::registerDecomposedQuery | ( | const std::string & | address, |
| const DecomposedQueryPlanPtr & | decomposedQueryPlan | ||
| ) |
| void NES::WorkerRPCClient::registerDecomposedQueryAsync | ( | const std::string & | address, |
| const DecomposedQueryPlanPtr & | decomposedQueryPlan, | ||
| const CompletionQueuePtr & | cq | ||
| ) |
register a query asynchronously
| address | address of node where query plan need to be registered |
| query | plan to register |
| cq | the completion queue |
References NES::NESStrongType< T, Tag, invalid, initial >::getRawValue(), NES_DEBUG, NES_TRACE, and NES::WorkerRPCClient::AsyncClientCall< ReplayType >::responseReader.
| bool NES::WorkerRPCClient::registerMonitoringPlan | ( | const std::string & | address, |
| const Monitoring::MonitoringPlanPtr & | plan | ||
| ) |
Registers to a remote worker node its monitoring plan.
| ipAddress | |
| the | monitoring plan |
References magic_enum::enum_integer(), NES_DEBUG, and NES_THROW_RUNTIME_ERROR.
| std::string NES::WorkerRPCClient::requestMonitoringData | ( | const std::string & | address | ) |
Requests from a remote worker node its monitoring data.
| ipAddress |
References NES_DEBUG, and NES_THROW_RUNTIME_ERROR.
| bool NES::WorkerRPCClient::startDecomposedQuery | ( | const std::string & | address, |
| SharedQueryId | sharedQueryId, | ||
| DecomposedQueryId | decomposedQueryId | ||
| ) |
method to start a already deployed decomposed query
| sharedQueryId | id of the shared query plan to which the decomposed query plan serves |
| decomposedQueryId | id of the decomposed query to start |
References NES::NESStrongType< T, Tag, invalid, initial >::getRawValue(), and NES_DEBUG.
| void NES::WorkerRPCClient::startDecomposedQueryAsync | ( | const std::string & | address, |
| SharedQueryId | sharedQueryId, | ||
| DecomposedQueryId | decomposedQueryId, | ||
| const CompletionQueuePtr & | cq | ||
| ) |
method to start a already deployed query asynchronously
| address | the address of the worker |
| sharedQueryId | id of the shared query plan to which the decomposed query plan serves |
| decomposedQueryId | id of the decomposed query to start |
| cq | the completion queue |
References NES::NESStrongType< T, Tag, invalid, initial >::getRawValue(), NES_DEBUG, and NES::WorkerRPCClient::AsyncClientCall< ReplayType >::responseReader.
| bool NES::WorkerRPCClient::stopDecomposedQuery | ( | const std::string & | address, |
| SharedQueryId | sharedQueryId, | ||
| DecomposedQueryId | decomposedQueryId, | ||
| Runtime::QueryTerminationType | terminationType | ||
| ) |
method to stop a query
| address | address of the new worker |
| sharedQueryId | to stop |
| sharedQueryId | id of the shared query plan to which the decomposed query plan serves |
| decomposedQueryId | id of the decomposed query to stop |
References NES::NESStrongType< T, Tag, invalid, initial >::getRawValue(), NES_DEBUG, and NES_ERROR.
| void NES::WorkerRPCClient::stopDecomposedQueryAsync | ( | const std::string & | address, |
| SharedQueryId | sharedQueryId, | ||
| DecomposedQueryId | decomposedQueryId, | ||
| Runtime::QueryTerminationType | terminationType, | ||
| const CompletionQueuePtr & | cq | ||
| ) |
method to stop a query asynchronously
| address | : address of the worker |
| sharedQueryId | id of the shared query plan to which the decomposed query plan serves |
| decomposedQueryId | id of the decomposed query to stop |
| terminationType | the termination type |
| cq | completion queue of grpc requests |
References NES::NESStrongType< T, Tag, invalid, initial >::getRawValue(), NES_DEBUG, and NES::WorkerRPCClient::AsyncClientCall< ReplayType >::responseReader.
| bool NES::WorkerRPCClient::unregisterDecomposedQuery | ( | const std::string & | address, |
| SharedQueryId | sharedQueryId, | ||
| DecomposedQueryId | decomposedQueryId | ||
| ) |
unregisters a decomposed query
| sharedQueryId | id of the shared query plan to which the decomposed query plan serves |
| decomposedQueryId | id of the decomposed query to unregister |
References NES::NESStrongType< T, Tag, invalid, initial >::getRawValue(), and NES_DEBUG.
| void NES::WorkerRPCClient::unregisterDecomposedQueryAsync | ( | const std::string & | address, |
| SharedQueryId | sharedQueryId, | ||
| DecomposedQueryId | decomposedQueryId, | ||
| const CompletionQueuePtr & | cq | ||
| ) |
un-registers a decomposed query asynchronously
| sharedQueryId | id of the shared query plan to which the decomposed query plan serves |
| decomposedQueryId | id of the decomposed query to unregister |
References NES::NESStrongType< T, Tag, invalid, initial >::getRawValue(), NES_DEBUG, and NES::WorkerRPCClient::AsyncClientCall< ReplayType >::responseReader.
| bool NES::WorkerRPCClient::updateNetworkSink | ( | const std::string & | address, |
| uint64_t | newNodeId, | ||
| const std::string & | newHostname, | ||
| uint32_t | newPort, | ||
| DecomposedQueryId | decomposedQueryId, | ||
| uint64_t | uniqueNetworkSinDescriptorId | ||
| ) |
requests a remote worker to reconfigure a NetworkSink so that the NetworkSink changes where it sends data to (changes downstream node)
| ipAddress | |
| newNodeId | : the id of the node that the Network Sink will send data to after reconfiguration |
| newHostname | : the hostname of the node that the NetworkSink should send data to |
| newPort | : the port of the node that the NetworkSink should send data to |
| decomposedQueryId | : the id of the query sub plan to which the Network Sink belongs |
| uniqueNetworkSinDescriptorId | : unique id of the network sink descriptor. Used to find the Network Sink to buffer data on. |
References NES::NESStrongType< T, Tag, invalid, initial >::getRawValue(), NES_DEBUG, and NES_ERROR.