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::CatalogServer Class Reference

#include <CatalogServer.h>

+ Inheritance diagram for pdb::CatalogServer:
+ Collaboration diagram for pdb::CatalogServer:

Public Member Functions

 ~CatalogServer ()
 
 CatalogServer (std::string catalogDirectory, bool isManagerCatalogServer, std::string managerIP, int managerPort)
 
void registerHandlers (PDBServer &forMe) override
 
int16_t searchForObjectTypeName (string objectTypeName)
 
string searchForObjectTypeName (int16_t typeIdentifier)
 
bool getSharedLibrary (int16_t identifier, vector< char > &putResultHere, std::string &errMsg)
 
bool getSharedLibraryByTypeName (std::string typeName, Handle< CatalogUserTypeMetadata > &typeMetadata, string &sharedLibraryBytes, std::string &errMsg)
 
int16_t getObjectType (string databaseName, string setName)
 
bool addDatabase (string databaseName, string &errMsg)
 
bool deleteDatabase (string databaseName, string &errMsg)
 
bool deleteSet (std::string databaseName, std::string setName, std::string &errMsg)
 
bool addSet (int16_t typeIdentifier, string databaseName, string setName, string &errMsg)
 
bool addNodeToSet (std::string nodeIP, std::string databaseName, std::string setName, std::string &errMsg)
 
bool addNodeToDB (std::string nodeIP, std::string databaseName, std::string &errMsg)
 
bool removeNodeFromSet (std::string nodeIP, std::string databaseName, std::string setName, std::string &errMsg)
 
bool removeNodeFromDB (std::string nodeIP, std::string databaseName, std::string &errMsg)
 
int16_t addObjectType (int16_t typeID, string &soFile, string &errMsg)
 
void printCatalog (Handle< CatalogPrintMetadata > &metadataToPrint)
 
bool printCatalog ()
 
bool addNodeMetadata (Handle< CatalogNodeMetadata > &nodeMetadata, std::string &errMsg)
 
bool addDatabaseMetadata (Handle< CatalogDatabaseMetadata > &dbMetadata, std::string &errMsg)
 
bool addSetMetadata (Handle< CatalogSetMetadata > &setMetadata, std::string &errMsg)
 
bool updateDatabaseMetadata (Handle< CatalogDatabaseMetadata > &dbMetadata, std::string &errMsg)
 
bool getIsManagerCatalogServer ()
 
void setIsManagerCatalogServer (bool isManagerCatalogServerIn)
 
template<class Type >
bool broadcastCatalogUpdate (Handle< Type > metadataToSend, map< string, pair< bool, string >> &broadcastResults, string &errMsg)
 
template<class Type >
bool broadcastCatalogDelete (Handle< Type > metadataToSend, map< string, pair< bool, string >> &broadcastResults, string &errMsg)
 
bool isNodeRegistered (string nodeIP)
 
bool isDatabaseRegistered (string dbName)
 
bool isSetRegistered (string dbName, string setName)
 
PDBCatalogPtr getCatalog ()
 
- Public Member Functions inherited from pdb::ServerFunctionality
virtual void cleanup ()
 
template<class Functionality >
Functionality & getFunctionality ()
 
void recordServer (PDBServer &recordMe)
 
PDBWorkerPtr getWorker ()
 
PDBLoggerPtr getLogger ()
 

Private Attributes

Handle< Vector
< CatalogNodeMetadata > > 
_allNodesInCluster
 
Handle< Vector
< CatalogSetMetadata > > 
_setTypes
 
Handle< Vector
< CatalogDatabaseMetadata > > 
_allDatabases
 
Handle< Vector
< CatalogUserTypeMetadata > > 
_udfsValues
 
map< string, int16_t > allTypeNames
 
map< int16_t, string > allTypeCodes
 
vector< string > allNodesInCluster
 
map< pair< string, string >
, int16_t > 
setTypes
 
PDBCatalogPtr pdbCatalog
 
CatalogClient catalogClientConnectionToManagerCatalogServer
 
std::string catalogDirectory
 
pthread_mutex_t workingMutex
 
bool isManagerCatalogServer
 
string managerIP = "localhost"
 
int managerPort = 8108
 
PDBLoggerPtr catServerLogger
 

Detailed Description

Definition at line 53 of file CatalogServer.h.

Constructor & Destructor Documentation

pdb::CatalogServer::~CatalogServer ( )

Definition at line 1414 of file CatalogServer.cc.

pdb::CatalogServer::CatalogServer ( std::string  catalogDirectory,
bool  isManagerCatalogServer,
std::string  managerIP,
int  managerPort 
)

Definition at line 1417 of file CatalogServer.cc.

Member Function Documentation

bool pdb::CatalogServer::addDatabase ( string  databaseName,
string &  errMsg 
)

Definition at line 1290 of file CatalogServer.cc.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool pdb::CatalogServer::addDatabaseMetadata ( Handle< CatalogDatabaseMetadata > &  dbMetadata,
std::string &  errMsg 
)

Definition at line 1596 of file CatalogServer.cc.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool pdb::CatalogServer::addNodeMetadata ( Handle< CatalogNodeMetadata > &  nodeMetadata,
std::string &  errMsg 
)

Definition at line 1566 of file CatalogServer.cc.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool pdb::CatalogServer::addNodeToDB ( std::string  nodeIP,
std::string  databaseName,
std::string &  errMsg 
)

Definition at line 1823 of file CatalogServer.cc.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool pdb::CatalogServer::addNodeToSet ( std::string  nodeIP,
std::string  databaseName,
std::string  setName,
std::string &  errMsg 
)

Definition at line 1734 of file CatalogServer.cc.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int16_t pdb::CatalogServer::addObjectType ( int16_t  typeID,
string &  soFile,
string &  errMsg 
)

Definition at line 906 of file CatalogServer.cc.

+ Here is the caller graph for this function:

bool pdb::CatalogServer::addSet ( int16_t  typeIdentifier,
string  databaseName,
string  setName,
string &  errMsg 
)

Definition at line 1126 of file CatalogServer.cc.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool pdb::CatalogServer::addSetMetadata ( Handle< CatalogSetMetadata > &  setMetadata,
std::string &  errMsg 
)

Definition at line 1679 of file CatalogServer.cc.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

template<class Type >
bool CatalogServer::broadcastCatalogDelete ( Handle< Type >  metadataToSend,
map< string, pair< bool, string >> &  broadcastResults,
string &  errMsg 
)

Definition at line 2046 of file CatalogServer.cc.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

template<class Type >
template bool CatalogServer::broadcastCatalogUpdate ( Handle< Type >  metadataToSend,
map< string, pair< bool, string >> &  broadcastResults,
string &  errMsg 
)

Definition at line 2012 of file CatalogServer.cc.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool pdb::CatalogServer::deleteDatabase ( string  databaseName,
string &  errMsg 
)

Definition at line 1345 of file CatalogServer.cc.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool pdb::CatalogServer::deleteSet ( std::string  databaseName,
std::string  setName,
std::string &  errMsg 
)

Definition at line 1013 of file CatalogServer.cc.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

PDBCatalogPtr pdb::CatalogServer::getCatalog ( )

Definition at line 56 of file CatalogServer.cc.

bool CatalogServer::getIsManagerCatalogServer ( )

Definition at line 2107 of file CatalogServer.cc.

int16_t pdb::CatalogServer::getObjectType ( string  databaseName,
string  setName 
)

Definition at line 896 of file CatalogServer.cc.

+ Here is the caller graph for this function:

bool pdb::CatalogServer::getSharedLibrary ( int16_t  identifier,
vector< char > &  putResultHere,
std::string &  errMsg 
)

Definition at line 829 of file CatalogServer.cc.

+ Here is the caller graph for this function:

bool pdb::CatalogServer::getSharedLibraryByTypeName ( std::string  typeName,
Handle< CatalogUserTypeMetadata > &  typeMetadata,
string &  sharedLibraryBytes,
std::string &  errMsg 
)

Definition at line 862 of file CatalogServer.cc.

+ Here is the caller graph for this function:

bool CatalogServer::isDatabaseRegistered ( string  dbName)

Definition at line 2082 of file CatalogServer.cc.

+ Here is the caller graph for this function:

bool CatalogServer::isNodeRegistered ( string  nodeIP)

Definition at line 2098 of file CatalogServer.cc.

+ Here is the caller graph for this function:

bool CatalogServer::isSetRegistered ( string  dbName,
string  setName 
)

Definition at line 2090 of file CatalogServer.cc.

+ Here is the caller graph for this function:

void pdb::CatalogServer::printCatalog ( Handle< CatalogPrintMetadata > &  metadataToPrint)

Definition at line 1531 of file CatalogServer.cc.

bool pdb::CatalogServer::printCatalog ( )

+ Here is the caller graph for this function:

void pdb::CatalogServer::registerHandlers ( PDBServer forMe)
overridevirtual

Implements pdb::ServerFunctionality.

Definition at line 81 of file CatalogServer.cc.

+ Here is the call graph for this function:

bool pdb::CatalogServer::removeNodeFromDB ( std::string  nodeIP,
std::string  databaseName,
std::string &  errMsg 
)

Definition at line 2003 of file CatalogServer.cc.

+ Here is the caller graph for this function:

bool pdb::CatalogServer::removeNodeFromSet ( std::string  nodeIP,
std::string  databaseName,
std::string  setName,
std::string &  errMsg 
)

Definition at line 1909 of file CatalogServer.cc.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int16_t pdb::CatalogServer::searchForObjectTypeName ( string  objectTypeName)

+ Here is the caller graph for this function:

std::string pdb::CatalogServer::searchForObjectTypeName ( int16_t  typeIdentifier)

Definition at line 810 of file CatalogServer.cc.

+ Here is the call graph for this function:

void CatalogServer::setIsManagerCatalogServer ( bool  isManagerCatalogServerIn)

Definition at line 2112 of file CatalogServer.cc.

bool pdb::CatalogServer::updateDatabaseMetadata ( Handle< CatalogDatabaseMetadata > &  dbMetadata,
std::string &  errMsg 
)

Definition at line 1641 of file CatalogServer.cc.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Member Data Documentation

Handle<Vector<CatalogDatabaseMetadata> > pdb::CatalogServer::_allDatabases
private

Definition at line 210 of file CatalogServer.h.

Handle<Vector<CatalogNodeMetadata> > pdb::CatalogServer::_allNodesInCluster
private

Definition at line 208 of file CatalogServer.h.

Handle<Vector<CatalogSetMetadata> > pdb::CatalogServer::_setTypes
private

Definition at line 209 of file CatalogServer.h.

Handle<Vector<CatalogUserTypeMetadata> > pdb::CatalogServer::_udfsValues
private

Definition at line 211 of file CatalogServer.h.

vector<string> pdb::CatalogServer::allNodesInCluster
private

Definition at line 218 of file CatalogServer.h.

map<int16_t, string> pdb::CatalogServer::allTypeCodes
private

Definition at line 215 of file CatalogServer.h.

map<string, int16_t> pdb::CatalogServer::allTypeNames
private

Definition at line 214 of file CatalogServer.h.

CatalogClient pdb::CatalogServer::catalogClientConnectionToManagerCatalogServer
private

Definition at line 230 of file CatalogServer.h.

std::string pdb::CatalogServer::catalogDirectory
private

Definition at line 233 of file CatalogServer.h.

PDBLoggerPtr pdb::CatalogServer::catServerLogger
private

Definition at line 248 of file CatalogServer.h.

bool pdb::CatalogServer::isManagerCatalogServer
private

Definition at line 239 of file CatalogServer.h.

string pdb::CatalogServer::managerIP = "localhost"
private

Definition at line 242 of file CatalogServer.h.

int pdb::CatalogServer::managerPort = 8108
private

Definition at line 245 of file CatalogServer.h.

PDBCatalogPtr pdb::CatalogServer::pdbCatalog
private

Definition at line 227 of file CatalogServer.h.

map<pair<string, string>, int16_t> pdb::CatalogServer::setTypes
private

Definition at line 221 of file CatalogServer.h.

pthread_mutex_t pdb::CatalogServer::workingMutex
private

Definition at line 236 of file CatalogServer.h.


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