Hybrid Query Processing Engine for Coprocessing in Database Systems
HyPE
hype::core::Operation Class Reference

This class represents an operation, which abstracts from algorithms and summarizes them under an abstract task, like sorting, join, selection, projection etc. More...

#include <operation.hpp>

Collaboration diagram for hype::core::Operation:

List of all members.

Public Types

typedef std::map< std::string,
std::tr1::shared_ptr
< Algorithm > > 
MapNameToAlgorithm

Public Member Functions

 Operation (const std::string &name)
 ~Operation ()
bool addAlgorithm (const std::string &name_of_algorithm, DeviceSpecification comp_dev, const std::string &name_of_statistical_method, const std::string &name_of_recomputation_strategy)
void removeAlgorithm (const std::string &name)
const SchedulingDecision getOptimalAlgorithm (const Tuple &input_values, DeviceTypeConstraint dev_constr=ANY_DEVICE)
bool hasAlgorithm (const std::string &name_of_algorithm)
 returns true if an algrithm named "name_of_algorithm" is registered for this operation and false otherwise
const AlgorithmPtr getAlgorithm (const std::string &name_of_algorithm)
bool setNewOptimizationCriterion (const std::string &name_of_optimization_criterion)
bool addObservation (const std::string &name_of_algorithm, const MeasurementPair &mp)
const std::vector< AlgorithmPtrgetAlgorithms ()
const std::map< double,
std::string > 
getEstimatedExecutionTimesforAlgorithms (const Tuple &input_values)
const std::string getName () const throw ()
void incrementNumberOfRightDecisions () throw ()
void incrementNumberOfTotalDecisions () throw ()
uint64_t getNextTimestamp () throw ()
uint64_t getCurrentTimestamp () const throw ()

Private Attributes

MapNameToAlgorithm map_algorithmname_to_pointer_
std::tr1::shared_ptr
< OptimizationCriterion_Internal
ptr_to_optimization_criterion_
std::string name_
unsigned int number_of_right_decisions_
unsigned int number_of_total_decisions_
uint64_t logical_time_

Detailed Description

An operation gets assigned two things. First is a list of algorithms, which represent the set of algorithms available to process operation O, which is basically the algorithm pool of the decision model. Second is an optimization_criterion, which is implemented by drived classes of stemod::core::OptimizationCriterion. The optimization criterion takes the computed estimated execution times of each algorithm and decides on the optimal algorithm, where the user specifies what is optimal by specifying an OptimizationCriterion.

Note that the stemod::core::OptimizationCriterioc can be exchanged at run-time, because the Operation class uses the pointer to implementation technique (or pimpl-idiom). This makes it highly adaptable.

Author:
Sebastian BreƟ
Version:
0.1
Date:
2012

Definition at line 38 of file operation.hpp.


Member Typedef Documentation

typedef std::map<std::string,std::tr1::shared_ptr<Algorithm> > hype::core::Operation::MapNameToAlgorithm

Definition at line 41 of file operation.hpp.


Constructor & Destructor Documentation

hype::core::Operation::Operation ( const std::string &  name)

Definition at line 8 of file operation.cpp.

References setNewOptimizationCriterion().

Here is the call graph for this function:


Member Function Documentation

bool hype::core::Operation::addAlgorithm ( const std::string &  name_of_algorithm,
DeviceSpecification  comp_dev,
const std::string &  name_of_statistical_method,
const std::string &  name_of_recomputation_strategy 
)

Definition at line 49 of file operation.cpp.

References debug, map_algorithmname_to_pointer_, name_, quiet, and verbose.

bool hype::core::Operation::addObservation ( const std::string &  name_of_algorithm,
const MeasurementPair mp 
)

Definition at line 134 of file operation.cpp.

References map_algorithmname_to_pointer_.

const std::map< double, std::string > hype::core::Operation::getEstimatedExecutionTimesforAlgorithms ( const Tuple input_values)

Definition at line 147 of file operation.cpp.

References debug, hype::core::EstimatedTime::getTimeinNanoseconds(), map_algorithmname_to_pointer_, quiet, and verbose.

Referenced by hype::core::Throughput::getOptimalAlgorithm_internal(), and hype::core::Throughput2::getOptimalAlgorithm_internal().

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 174 of file operation.cpp.

References logical_time_.

Referenced by hype::core::Throughput::getOptimalAlgorithm_internal().

Here is the caller graph for this function:

Definition at line 109 of file operation.cpp.

References name_, and ptr_to_optimization_criterion_.

bool hype::core::Operation::hasAlgorithm ( const std::string &  name_of_algorithm)

Definition at line 120 of file operation.cpp.

References map_algorithmname_to_pointer_.

void hype::core::Operation::removeAlgorithm ( const std::string &  name)

Definition at line 74 of file operation.cpp.

bool hype::core::Operation::setNewOptimizationCriterion ( const std::string &  name_of_optimization_criterion)

Definition at line 98 of file operation.cpp.

References hype::core::getNewOptimizationCriterionbyName(), name_, and ptr_to_optimization_criterion_.

Referenced by Operation().

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

Definition at line 90 of file operation.hpp.

Referenced by getCurrentTimestamp(), and getNextTimestamp().

Definition at line 88 of file operation.hpp.

Referenced by incrementNumberOfRightDecisions().

Definition at line 89 of file operation.hpp.

Referenced by incrementNumberOfTotalDecisions().


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines