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 <PartitionPolicy.h>
Public Types | |
enum | Policy { RANDOM, ROUNDROBIN, FAIR, DEFAULT } |
Public Member Functions | |
std::vector< NodePartitionDataPtr > | createNodePartitionData (Handle< Vector< Handle< NodeDispatcherData >>> storageNodes) |
virtual std::shared_ptr < std::unordered_map< NodeID, Handle< Vector< Handle< Object > > > > > | partition (Handle< Vector< Handle< Object >>> toPartition)=0 |
virtual void | updateStorageNodes (Handle< Vector< Handle< NodeDispatcherData >>> storageNodes)=0 |
virtual NodePartitionDataPtr | updateExistingNode (NodePartitionDataPtr newNodeData, NodePartitionDataPtr oldNodeData)=0 |
virtual NodePartitionDataPtr | updateNewNode (NodePartitionDataPtr newNode)=0 |
virtual NodePartitionDataPtr | handleDeadNode (NodePartitionDataPtr deadNode)=0 |
Public Attributes | |
std::vector< NodePartitionDataPtr > | storageNodes |
An interface used by DispatcherServer to properly map PDB::Objects to the Storage Node which they should be stored. Calls to partition may be non-deterministic (see RandomPolicy).
Definition at line 44 of file PartitionPolicy.h.
Enumerator | |
---|---|
RANDOM | |
ROUNDROBIN | |
FAIR | |
DEFAULT |
Definition at line 46 of file PartitionPolicy.h.
std::vector<NodePartitionDataPtr> pdb::PartitionPolicy::createNodePartitionData | ( | Handle< Vector< Handle< NodeDispatcherData >>> | storageNodes | ) |
|
pure virtual |
Implemented in pdb::RandomPolicy, and pdb::RoundRobinPolicy.
|
pure 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 |
Implemented in pdb::RandomPolicy, and pdb::RoundRobinPolicy.
|
pure virtual |
Implemented in pdb::RandomPolicy, and pdb::RoundRobinPolicy.
|
pure virtual |
Implemented in pdb::RandomPolicy, and pdb::RoundRobinPolicy.
|
pure virtual |
Updates PartitionPolicy with a collection of all the available storage nodes in the cluster
storageNodes | a vector of the live storage nodes |
Implemented in pdb::RandomPolicy, and pdb::RoundRobinPolicy.
std::vector<NodePartitionDataPtr> pdb::PartitionPolicy::storageNodes |
Definition at line 75 of file PartitionPolicy.h.