I - Vertex index valueV - Vertex valueE - Edge valuepublic interface MasterGraphPartitioner<I extends org.apache.hadoop.io.WritableComparable,V extends org.apache.hadoop.io.Writable,E extends org.apache.hadoop.io.Writable>
| Modifier and Type | Method and Description | 
|---|---|
| Collection<PartitionOwner> | createInitialPartitionOwners(Collection<WorkerInfo> availableWorkerInfos,
                            int maxWorkers)Set some initial partition owners for the graph. | 
| PartitionStats | createPartitionStats()Instantiate the  PartitionStatsimplementation used to read the
 worker stats | 
| Collection<PartitionOwner> | generateChangedPartitionOwners(Collection<PartitionStats> allPartitionStatsList,
                              Collection<WorkerInfo> availableWorkers,
                              int maxWorkers,
                              long superstep)After the worker stats have been merged to a single list, the master can
 use this information to send commands to the workers for any
  Partitionchanges. | 
| Collection<PartitionOwner> | getCurrentPartitionOwners()Get current partition owners at this time. | 
| void | setPartitionOwners(Collection<PartitionOwner> partitionOwners)Sets partition owners for the graph. | 
Collection<PartitionOwner> createInitialPartitionOwners(Collection<WorkerInfo> availableWorkerInfos, int maxWorkers)
availableWorkerInfos - Workers available for partition assignmentmaxWorkers - Maximum number of workersvoid setPartitionOwners(Collection<PartitionOwner> partitionOwners)
partitionOwners - assigned partition owners.Collection<PartitionOwner> generateChangedPartitionOwners(Collection<PartitionStats> allPartitionStatsList, Collection<WorkerInfo> availableWorkers, int maxWorkers, long superstep)
Partition changes. This protocol is specific to the
 MasterGraphPartitioner implementation.allPartitionStatsList - All partition stats from all workers.availableWorkers - Workers available for partition assignmentmaxWorkers - Maximum number of workerssuperstep - Partition owners will be set for this superstepPartitionOwner objects that changed from
         the previous superstep, empty list if no change.Collection<PartitionOwner> getCurrentPartitionOwners()
PartitionOwner objectsPartitionStats createPartitionStats()
PartitionStats implementation used to read the
 worker statsPartitionStats objectCopyright © 2011-2020 The Apache Software Foundation. All Rights Reserved.