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.
|
#include <RoundRobinPolicy.h>
Public Member Functions | |
RoundRobinPolicy () | |
~RoundRobinPolicy () | |
void | updateStorageNodes (Handle< Vector< Handle< NodeDispatcherData >>> storageNodes) |
std::shared_ptr < std::unordered_map< NodeID, Handle< Vector< Handle< Object > > > > > | partition (Handle< Vector< Handle< Object >>> toPartition) |
Public Member Functions inherited from pdb::PartitionPolicy | |
std::vector< NodePartitionDataPtr > | createNodePartitionData (Handle< Vector< Handle< NodeDispatcherData >>> storageNodes) |
Public Attributes | |
int | numNodes = 0 |
pthread_mutex_t | idMutex |
Public Attributes inherited from pdb::PartitionPolicy | |
std::vector< NodePartitionDataPtr > | storageNodes |
Static Public Attributes | |
static unsigned int | curNodeId = 0 |
Private Member Functions | |
std::vector< NodePartitionDataPtr > | createNodePartitionData (Handle< Vector< Handle< NodeDispatcherData >>> storageNodes) |
NodePartitionDataPtr | updateExistingNode (NodePartitionDataPtr newNodeData, NodePartitionDataPtr oldNodeData) |
NodePartitionDataPtr | updateNewNode (NodePartitionDataPtr newNode) |
NodePartitionDataPtr | handleDeadNode (NodePartitionDataPtr deadNode) |
Additional Inherited Members | |
Public Types inherited from pdb::PartitionPolicy | |
enum | Policy { RANDOM, ROUNDROBIN, FAIR, DEFAULT } |
RoundRobinPolicy simply selects the next node from its Storage Nodes List to send the entire Vector of data to. We send the entire Vector to a single node instead of partitioning it on an Object granularity to save time.
Definition at line 38 of file RoundRobinPolicy.h.
pdb::RoundRobinPolicy::RoundRobinPolicy | ( | ) |
Definition at line 26 of file RoundRobinPolicy.cc.
pdb::RoundRobinPolicy::~RoundRobinPolicy | ( | ) |
Definition at line 31 of file RoundRobinPolicy.cc.
|
private |
|
privatevirtual |
Implements pdb::PartitionPolicy.
Definition at line 91 of file RoundRobinPolicy.cc.
|
virtual |
Partitions a Vector of PDB data into a number of smaller Vectors all mapped to a respective Storage Node
toPartition | a vector of PDB::Objects to be stored |
Implements pdb::PartitionPolicy.
Definition at line 97 of file RoundRobinPolicy.cc.
|
privatevirtual |
Implements pdb::PartitionPolicy.
Definition at line 80 of file RoundRobinPolicy.cc.
|
privatevirtual |
Implements pdb::PartitionPolicy.
Definition at line 86 of file RoundRobinPolicy.cc.
|
virtual |
Updates PartitionPolicy with a collection of all the available storage nodes in the cluster
storageNodes | a vector of the live storage nodes |
Implements pdb::PartitionPolicy.
Definition at line 35 of file RoundRobinPolicy.cc.
|
static |
Definition at line 42 of file RoundRobinPolicy.h.
pthread_mutex_t pdb::RoundRobinPolicy::idMutex |
Definition at line 44 of file RoundRobinPolicy.h.
int pdb::RoundRobinPolicy::numNodes = 0 |
Definition at line 43 of file RoundRobinPolicy.h.