#include <AuroraNode.h>
An AuroraNode contains a catalog and a scheduler, and a manager for dequeuers (see getDequeueHandle()).
Thread safety requirements:
Public Types | |
typedef ::StreamProperties | StreamProperties |
enum | EntityType { STREAM = 1, SCHEMA = 2, BOX = 3, INPUT_STREAMS = 100, OUTPUT_STREAMS = 101 } |
An enumeration of the types of entities stored in a catalog. More... | |
Public Member Functions | |
AuroraNode (ptr< ConfFile > conf=ptr< ConfFile >()) throw ( AuroraException ) | |
Creates a node. | |
~AuroraNode () | |
Destroys the node. | |
void | modifyNetwork (string data, BoxPackage &boxes) throw ( AuroraException ) |
Makes a modification to the network. | |
void | load_box (string file_path) throw ( AuroraException ) |
Dynamically load box code from a shared object. | |
void | typecheck (string data, map< string, TupleDescription > &streams) throw ( AuroraException ) |
Typechecks a potential modification to the network, outputting the tuple descriptions of any output streams that would be created. | |
void | enqueue (const char *stream_name, const void *data, size_t tuple_length, size_t num_tuples, const void *schema_uuid=0) throw ( AuroraException ) |
Enqueue tuples to a stream. | |
DequeueHandle | getDequeueHandle () |
Allocate a new handle for dequeuing. | |
void | start () throw ( AuroraException ) |
Starts the network. | |
void | shutdown () throw ( AuroraException ) |
Shuts down the network. | |
void | typecheck (string data, vector< StreamProperties > &streams) throw ( AuroraException ) |
Typechecks a potential modification to the network, outputting properties of all streams in the network. | |
void | validate (string data) throw ( AuroraException ) |
Validates a potential modification to the network. | |
StreamProperties | getStreamProperties (string entity) throw ( AuroraException ) |
Returns a description of a stream, throwing an exception if the stream does not exist. | |
string | describe (string entity) throw ( AuroraException ) |
Returns an XML description of an entity, or an empty string if the method does not exist. | |
void | listEntities (EntityType type, vector< string > &names) throw ( AuroraException ) |
Lists all entities of a particular type. | |
void | drain () throw ( AuroraException ) |
Drains the network: waits until there are no more tuples at all in the network and then shuts the network. | |
void | chokeBoxes (vector< string > names) |
Chokes off inputs to the given boxes. | |
void | suspendBoxes (vector< string > names) |
Chokes off inputs to the given boxes. | |
void | resumeBoxes (vector< string > names) |
Resumes any inputs previously choked. | |
void | packBoxes (string data, BoxPackage &boxes) throw ( AuroraException ) |
Populates the package with frozen box states. | |
void | checkpoint (vector< long long > &measurements) |
Take a snapshot of the state of the complete query network The measurements parameter is temporarily here so we can register the duration of checkpointing. | |
void | recover () |
Recover state of query network from last snapshot. | |
void | schedule_checkpoint_task (ptr< GenericCheckpointTask > task) |
Helper function to scheduler either a checkpoint or a recovery task. | |
string | repr () const |
Returns a multi-line string representation of the node. | |
Statistics & | getStatsObject () |
Return the statistics object. | |
const Statistics & | getStatsObject () const |
set< ptr< QBox > > | getBoxes () const |
Returns a set of all the boxes presently in the network. | |
ptr< QBox > | getBox (string name) const |
Returns a box with a particular name, or null if it doesn't exist. | |
ptr< Stream > | getStream (string name) const |
Returns a stream with a particular name, or null if it doesn't exist. | |
ptr< LockSet > | getLockSet (string name) |
Returns a lockset with a particular name, creating a new one if it doesn't exist. | |
TupleDescription | getTupleDescription (string name) const |
Returns a schema with a particular name, or null if it doesn't exist. | |
TupleDescription | getTupleDescriptionByHash (string hash) const |
Returns a schema with a particular hash. | |
ptr< Stream > | createStream (string name, TupleDescription desc) throw ( AuroraException ) |
Creates a stream with a particular name and schema. | |
void | create_cpview (CPViewDescription view_desc, StreamDef streamdef) throw ( AuroraException ) |
Creates a connection point. | |
ptr< ConfFile > | getProperties () const throw ( AuroraException ) |
Returns the properties for the node (or 0 if there are no properties available). | |
unsigned int | xGetInputQueueLengthSum () const |
Returns the sum of all TupleQueues attached to all input streams. | |
string | getNetworkAsDot () const |
string | getNetworkAsDotSubgraph (string prefix, string attrs) const |
string | getNetworkAsDotStatements (string prefix) const |
PagePool & | getPagePool () |
const CpuStats & | getCpuStats () const |
Public Attributes | |
double | selval |
StatsMgr | sm |
Statistics manager that keeps all the statistics per this node. |
|
|
|
An enumeration of the types of entities stored in a catalog.
|
|
Creates a node.
|
|
Destroys the node.
|
|
Take a snapshot of the state of the complete query network The measurements parameter is temporarily here so we can register the duration of checkpointing.
|
|
Chokes off inputs to the given boxes.
|
|
Creates a connection point.
|
|
Creates a stream with a particular name and schema. Currently may only be invoked before the network is started. |
|
Returns an XML description of an entity, or an empty string if the method does not exist.
|
|
Drains the network: waits until there are no more tuples at all in the network and then shuts the network. Blocks until this is complete. Throws an exception if the scheduler does not support draining. |
|
Enqueue tuples to a stream. The stream must not be tied to the output of any box in the network.
|
|
Returns a box with a particular name, or null if it doesn't exist.
|
|
Returns a set of all the boxes presently in the network.
|
|
|
|
Allocate a new handle for dequeuing.
|
|
Returns a lockset with a particular name, creating a new one if it doesn't exist.
|
|
|
|
|
|
|
|
|
|
Returns the properties for the node (or 0 if there are no properties available).
|
|
|
|
Return the statistics object.
|
|
Returns a stream with a particular name, or null if it doesn't exist.
|
|
Returns a description of a stream, throwing an exception if the stream does not exist.
|
|
Returns a schema with a particular name, or null if it doesn't exist.
|
|
Returns a schema with a particular hash.
|
|
Lists all entities of a particular type. (One can then use "describe" to obtain a description of an entity.) names is cleared first. |
|
Dynamically load box code from a shared object.
|
|
Makes a modification to the network. If the scheduler does not support dynamic networks, the network must not have been started yet.
|
|
Populates the package with frozen box states.
|
|
Recover state of query network from last snapshot.
|
|
Returns a multi-line string representation of the node.
|
|
Resumes any inputs previously choked.
|
|
Helper function to scheduler either a checkpoint or a recovery task.
|
|
Shuts down the network.
|
|
Starts the network.
|
|
Chokes off inputs to the given boxes.
|
|
Typechecks a potential modification to the network, outputting properties of all streams in the network. streams is cleared first. |
|
Typechecks a potential modification to the network, outputting the tuple descriptions of any output streams that would be created. This method may be called even if the network has been started.
|
|
Validates a potential modification to the network. Returns successfully if the modification is guaranteed to result in a complete, valid network. |
|
Returns the sum of all TupleQueues attached to all input streams.
|
|
|
|
Statistics manager that keeps all the statistics per this node. this should be private, but locking/unlocking creates some issues need to ask Ying what the appropriate approach would be (i.e. if it is safe to have multiple classes having access to the same object). |