![]() |
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 <RandomPolicy.h>
Inheritance diagram for pdb::RandomPolicy:
Collaboration diagram for pdb::RandomPolicy:Public Member Functions | |
| RandomPolicy () | |
| ~RandomPolicy () | |
| 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) |
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) |
Private Attributes | |
| const int | SEED = time(NULL) |
Additional Inherited Members | |
Public Types inherited from pdb::PartitionPolicy | |
| enum | Policy { RANDOM, ROUNDROBIN, FAIR, DEFAULT } |
Public Attributes inherited from pdb::PartitionPolicy | |
| std::vector< NodePartitionDataPtr > | storageNodes |
RandomPolicy simply selects a random 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 40 of file RandomPolicy.h.
| pdb::RandomPolicy::RandomPolicy | ( | ) |
Definition at line 26 of file RandomPolicy.cc.
| pdb::RandomPolicy::~RandomPolicy | ( | ) |
Definition at line 31 of file RandomPolicy.cc.
|
private |
|
privatevirtual |
Implements pdb::PartitionPolicy.
Definition at line 88 of file RandomPolicy.cc.
Here is the caller graph for this function:
|
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 93 of file RandomPolicy.cc.
|
privatevirtual |
Implements pdb::PartitionPolicy.
Definition at line 77 of file RandomPolicy.cc.
Here is the caller graph for this function:
|
privatevirtual |
Implements pdb::PartitionPolicy.
Definition at line 83 of file RandomPolicy.cc.
Here is the caller graph for this function:
|
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 33 of file RandomPolicy.cc.
Here is the call graph for this function:
|
private |
Definition at line 53 of file RandomPolicy.h.