A platform for high-performance distributed tool and library development written in C++. It can be deployed in two different cluster modes: standalone or distributed. API for v0.5.0, released on June 13, 2018.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
pdb::StatisticsDB Class Reference

#include <StatisticsDB.h>

+ Collaboration diagram for pdb::StatisticsDB:

Public Member Functions

 StatisticsDB (ConfigurationPtr conf)
 
 ~StatisticsDB ()
 
bool openDB ()
 
bool closeDB ()
 
bool createTables ()
 
bool execDB (std::string cmdString)
 
bool createDir ()
 
bool createData (std::string databaseName, std::string setName, std::string created_jobId, std::string setType, std::string className, int typeId, size_t pageSize, long &id)
 
bool updateDataForSize (long id, size_t size)
 
bool updateDataForRemoval (long id)
 
bool createDataTransformation (long input_data_id, long output_data_id, int num_partitions, int num_nodes, std::string transformationType, std::string tcap, Handle< Vector< Handle< Computation >>> computations, long &id)
 
std::vector< std::shared_ptr
< TransformedSet > > 
getTransformedSets (std::pair< std::string, std::string > databaseAndSetName)
 
long getLatestId (std::string tableName)
 
long getLatestDataId (std::pair< std::string, std::string > databaseAndSetName)
 
long getLatestTransformationId ()
 

Protected Member Functions

std::string quoteStr (std::string &s)
 
void replaceStr (std::string &str, const std::string &oldStr, const std::string &newStr)
 

Private Attributes

std::string pathToDBFile = "dbFile"
 
sqlite3 * statisticsDBHandler = nullptr
 
ConfigurationPtr conf = nullptr
 
long dataId = 0
 
long transformationId = 0
 

Detailed Description

Definition at line 19 of file StatisticsDB.h.

Constructor & Destructor Documentation

pdb::StatisticsDB::StatisticsDB ( ConfigurationPtr  conf)

Definition at line 10 of file StatisticsDB.cc.

+ Here is the call graph for this function:

pdb::StatisticsDB::~StatisticsDB ( )

Definition at line 31 of file StatisticsDB.cc.

+ Here is the call graph for this function:

Member Function Documentation

bool pdb::StatisticsDB::closeDB ( )

Definition at line 55 of file StatisticsDB.cc.

+ Here is the caller graph for this function:

bool pdb::StatisticsDB::createData ( std::string  databaseName,
std::string  setName,
std::string  created_jobId,
std::string  setType,
std::string  className,
int  typeId,
size_t  pageSize,
long &  id 
)

Definition at line 121 of file StatisticsDB.cc.

+ Here is the call graph for this function:

bool pdb::StatisticsDB::createDataTransformation ( long  input_data_id,
long  output_data_id,
int  num_partitions,
int  num_nodes,
std::string  transformationType,
std::string  tcap,
Handle< Vector< Handle< Computation >>>  computations,
long &  id 
)

Definition at line 174 of file StatisticsDB.cc.

+ Here is the call graph for this function:

bool pdb::StatisticsDB::createDir ( )

Definition at line 111 of file StatisticsDB.cc.

+ Here is the caller graph for this function:

bool pdb::StatisticsDB::createTables ( )

Definition at line 64 of file StatisticsDB.cc.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool pdb::StatisticsDB::execDB ( std::string  cmdString)

Definition at line 93 of file StatisticsDB.cc.

+ Here is the caller graph for this function:

long pdb::StatisticsDB::getLatestDataId ( std::pair< std::string, std::string >  databaseAndSetName)

Definition at line 250 of file StatisticsDB.cc.

+ Here is the call graph for this function:

long pdb::StatisticsDB::getLatestId ( std::string  tableName)

Definition at line 228 of file StatisticsDB.cc.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

long pdb::StatisticsDB::getLatestTransformationId ( )

Definition at line 272 of file StatisticsDB.cc.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

std::vector< std::shared_ptr< TransformedSet > > pdb::StatisticsDB::getTransformedSets ( std::pair< std::string, std::string >  databaseAndSetName)

Definition at line 219 of file StatisticsDB.cc.

bool pdb::StatisticsDB::openDB ( )

Definition at line 38 of file StatisticsDB.cc.

+ Here is the caller graph for this function:

std::string pdb::StatisticsDB::quoteStr ( std::string &  s)
protected

Definition at line 277 of file StatisticsDB.cc.

+ Here is the caller graph for this function:

void pdb::StatisticsDB::replaceStr ( std::string &  str,
const std::string &  oldStr,
const std::string &  newStr 
)
protected

Definition at line 283 of file StatisticsDB.cc.

+ Here is the caller graph for this function:

bool pdb::StatisticsDB::updateDataForRemoval ( long  id)

Definition at line 164 of file StatisticsDB.cc.

+ Here is the call graph for this function:

bool pdb::StatisticsDB::updateDataForSize ( long  id,
size_t  size 
)

Definition at line 153 of file StatisticsDB.cc.

+ Here is the call graph for this function:

Member Data Documentation

ConfigurationPtr pdb::StatisticsDB::conf = nullptr
private

Definition at line 180 of file StatisticsDB.h.

long pdb::StatisticsDB::dataId = 0
private

Definition at line 183 of file StatisticsDB.h.

std::string pdb::StatisticsDB::pathToDBFile = "dbFile"
private

Definition at line 174 of file StatisticsDB.h.

sqlite3* pdb::StatisticsDB::statisticsDBHandler = nullptr
private

Definition at line 177 of file StatisticsDB.h.

long pdb::StatisticsDB::transformationId = 0
private

Definition at line 186 of file StatisticsDB.h.


The documentation for this class was generated from the following files: