18 #ifndef SHUFFLE_INFO_H
19 #define SHUFFLE_INFO_H
47 ShuffleInfo(std::vector<StandardResourceInfoPtr> *clusterResources,
48 double partitionToCoreRatio) {
50 this->
numNodes = clusterResources->size();
55 for (i = 0; i < this->
numNodes; i++) {
57 int numCoresOnThisNodeForHashing =
58 (int)((
double)(node->getNumCores()) * partitionToCoreRatio);
59 if (numCoresOnThisNodeForHashing == 0) {
60 numCoresOnThisNodeForHashing = 1;
62 for (j = 0; j < numCoresOnThisNodeForHashing; j++) {
66 std::string curAddress =
67 node->getAddress() +
":" + std::to_string(node->getPort());
std::vector< std::vector< HashPartitionID > > & getPartitionIds()
std::vector< std::string > addresses
std::vector< std::vector< HashPartitionID > > partitionIds
unsigned int HashPartitionID
std::shared_ptr< StandardResourceInfo > StandardResourceInfoPtr
std::vector< std::string > & getAddresses()
int getNumHashPartitions()
ShuffleInfo(std::vector< StandardResourceInfoPtr > *clusterResources, double partitionToCoreRatio)