Main Page | Namespace List | Class Hierarchy | Class List | File List | Class Members | File Members

QueryProcessor Class Reference

#include <QueryProcessor.h>

List of all members.


Detailed Description

Facade to the whole QueryProcessor component.


Public Member Functions

 QueryProcessor (string id, InetAddress data_add, int ha_interval=HA_INTERVAL, bool no_dups=false)
virtual ~QueryProcessor ()
RPC< Query > typecheck (Query query)
 Verify that the query is valid and compute schemas for all intermediate streams.
AsyncRPC< void > setup_query (Query query)
 Once a query is typechecked, we can set it up in the stream processing engine.
RPC< Query > typecheck_and_setup (Query query)
 Executes the typecheck and the setup in one operation (convenience method).
AsyncRPC< void > load_box (string file_path)
 Dynamic box loading.
RPC< vector< Query > > choke_queries (vector< Query > queries)
 Chokes off inputs to all boxes specified in the query.
RPC< void > resume_queries (vector< Query > queries)
 Resumes any inputs of the given boxes that were choked.
RPC< Query > pack_query (Query query)
 Packs a query, returning the frozen state inside the query.
RPC< vector< Query > > pack_queries (vector< Query > queries)
 Packs the state of a bunch of queries in a single batch operation.
RPC< void > remove_query (Query query)
 Removes a query.
RPC< void > replace_query (vector< Name > old_queries, vector< Query > new_queries)
 Replace query hunks, union of hunk contents cannot change.
RPC< void > set_query_status (Name name, QueryStatus status)
 Change query state from "setup" to "running" or from "running" to "deleted" or "moved".
RPC< void > set_queries_status (vector< Name > name, QueryStatus status)
 Change the state of a set of queries at once.
RPC< void > subscribe (Subscription sub, unsigned int add_or_remove)
 Creates or deletes client subscription to streams A subscription lets a client or remote node receive events on a given stream.
RPC< vector< Subscription > > subscribe_many (vector< Subscription > sub, unsigned int add_or_remove)
 Operates on a list of subscriptions in one operation.
RPC< vector< Subscription > > get_subscriptions (vector< Name > streams)
 For a vector of streams, returns the list of clients currently subscribed to each one.
RPC< vector< Stats > > get_stats ()
 Return the currents statistics for the list of queries.
RPC< double > get_sel ()
RPC< void > create_stream (StreamDef stream)
 Defines a locally owned stream.
RPC< void > create_cpview (CPViewDescription view_desc, StreamDef streamdef)
 Creates a local cpview.
RPC< void > update_stream (StreamDef old_sd, StreamDef new_sd)
 Changes the definition and possibly origin of an input stream QueryProcessor will change its subscription from the old to the new stream.
RPC< void > ack (MedusaID node, StreamID id, string last_tuple)
 Processes ACK0 from downstream node that it has received a tuple.
RPC< void > trim (MedusaID node, StreamID id, string last_tuple)
 Trims output queue for stream id up to tuple last_tuple.
RPC< void > set_recovery_method (int method)
 Set the recovery method appropriately (Enums don't work for RPC-style methods).
RPC< void > set_primary_status (bool status)
 The HA component has to tell us if we are the primary or not.
RPC< void > set_secondaries (vector< MedusaID > secondaries)
 Set the secondaries that need to receive queue trimming messages or checkpoint messages.
RPC< void > set_replicas (vector< MedusaID > replicas)
 For fault-tolerance involving reconciling state.
RPC< void > checkpoint (vector< StreamEvent > tuples_to_checkpoint, map< StreamID, string > tuples_to_trim)
 Receives a checkpoint message from the primary.
 NMSTL_RPC_OBJECT (QueryProcessor)


Constructor & Destructor Documentation

BOREALIS_NAMESPACE_BEGIN QueryProcessor::QueryProcessor string  id,
InetAddress  data_add,
int  ha_interval = HA_INTERVAL,
bool  no_dups = false
 

QueryProcessor::~QueryProcessor  )  [virtual]
 


Member Function Documentation

RPC< void > QueryProcessor::ack MedusaID  node,
StreamID  id,
string  tuple
 

Processes ACK0 from downstream node that it has received a tuple.

For simplicity of experimentation we first assume only one client per output stream. We also assume a single output stream per query

RPC< void > QueryProcessor::checkpoint vector< StreamEvent >  tuples_to_checkpoint,
map< StreamID, string >  tuples_to_trim
 

Receives a checkpoint message from the primary.

RPC< vector< Query > > QueryProcessor::choke_queries vector< Query >  queries  ) 
 

Chokes off inputs to all boxes specified in the query.

Any tuples arriving are placed into stream buffers.

RPC< void > QueryProcessor::create_cpview CPViewDescription  view_desc,
StreamDef  streamdef
 

Creates a local cpview.

RPC< void > QueryProcessor::create_stream StreamDef  stream  ) 
 

Defines a locally owned stream.

RPC< double > QueryProcessor::get_sel  ) 
 

RPC< vector< Stats > > QueryProcessor::get_stats  ) 
 

Return the currents statistics for the list of queries.

Returns:
list of performance/load information Each Stats element gives the load information for one query

RPC< vector< Subscription > > QueryProcessor::get_subscriptions vector< Name >  streams  ) 
 

For a vector of streams, returns the list of clients currently subscribed to each one.

AsyncRPC< void > QueryProcessor::load_box string  file_path  ) 
 

Dynamic box loading.

QueryProcessor::NMSTL_RPC_OBJECT QueryProcessor   ) 
 

RPC< vector< Query > > QueryProcessor::pack_queries vector< Query >  queries  ) 
 

Packs the state of a bunch of queries in a single batch operation.

Returns a copy of the queries with the packed state

RPC< Query > QueryProcessor::pack_query Query  query  ) 
 

Packs a query, returning the frozen state inside the query.

RPC< void > QueryProcessor::remove_query Query  query  ) 
 

Removes a query.

RPC< void > QueryProcessor::replace_query vector< Name >  old_queries,
vector< Query >  new_queries
 

Replace query hunks, union of hunk contents cannot change.

RPC< void > QueryProcessor::resume_queries vector< Query >  queries  ) 
 

Resumes any inputs of the given boxes that were choked.

RPC< void > QueryProcessor::set_primary_status bool  status  ) 
 

The HA component has to tell us if we are the primary or not.

RPC< void > QueryProcessor::set_queries_status vector< Name >  name,
QueryStatus  status
 

Change the state of a set of queries at once.

RPC< void > QueryProcessor::set_query_status Name  name,
QueryStatus  status
 

Change query state from "setup" to "running" or from "running" to "deleted" or "moved".

RPC< void > QueryProcessor::set_recovery_method int  method  ) 
 

Set the recovery method appropriately (Enums don't work for RPC-style methods).

RPC< void > QueryProcessor::set_replicas vector< MedusaID >  replicas  ) 
 

For fault-tolerance involving reconciling state.

RPC< void > QueryProcessor::set_secondaries vector< MedusaID >  secondaries  ) 
 

Set the secondaries that need to receive queue trimming messages or checkpoint messages.

AsyncRPC< void > QueryProcessor::setup_query Query  query  ) 
 

Once a query is typechecked, we can set it up in the stream processing engine.

A setup query starts in the "stopped" state

RPC< void > QueryProcessor::subscribe Subscription  sub,
unsigned int  add_or_remove
 

Creates or deletes client subscription to streams A subscription lets a client or remote node receive events on a given stream.

RPC< vector< Subscription > > QueryProcessor::subscribe_many vector< Subscription >  sub,
unsigned int  add_or_remove
 

Operates on a list of subscriptions in one operation.

Adds or removes all the subscriptions in the list

RPC< void > QueryProcessor::trim MedusaID  node,
StreamID  id,
string  last_tuple
 

Trims output queue for stream id up to tuple last_tuple.

RPC< Query > QueryProcessor::typecheck Query  query  ) 
 

Verify that the query is valid and compute schemas for all intermediate streams.

Returns:
a copy of the query with schemas on all intermediate streams computed

RPC< Query > QueryProcessor::typecheck_and_setup Query  query  ) 
 

Executes the typecheck and the setup in one operation (convenience method).

RPC< void > QueryProcessor::update_stream StreamDef  old_sd,
StreamDef  new_sd
 

Changes the definition and possibly origin of an input stream QueryProcessor will change its subscription from the old to the new stream.


The documentation for this class was generated from the following files:
Generated on Fri Nov 12 15:15:23 2004 for Borealis by doxygen 1.3.8