public class PartitionBalancer extends Object
| Modifier and Type | Field and Description | 
|---|---|
| static String | EGDE_BALANCE_ALGORITHMRebalance across supersteps by edges | 
| static String | PARTITION_BALANCE_ALGORITHMPartition balancing algorithm | 
| static String | STATIC_BALANCE_ALGORITHMNo rebalancing during the supersteps | 
| static String | VERTICES_BALANCE_ALGORITHMRebalance across supersteps by vertices | 
| Modifier and Type | Method and Description | 
|---|---|
| static Collection<PartitionOwner> | balancePartitionsAcrossWorkers(org.apache.hadoop.conf.Configuration conf,
                              Collection<PartitionOwner> partitionOwners,
                              Collection<PartitionStats> allPartitionStats,
                              Collection<WorkerInfo> availableWorkerInfos)Balance the partitions with an algorithm based on a value. | 
| static PartitionExchange | updatePartitionOwners(List<PartitionOwner> partitionOwnerList,
                     WorkerInfo myWorkerInfo,
                     Collection<? extends PartitionOwner> masterSetPartitionOwners)Helper function to update partition owners and determine which
 partitions need to be sent from a specific worker. | 
public static final String PARTITION_BALANCE_ALGORITHM
public static final String STATIC_BALANCE_ALGORITHM
public static final String EGDE_BALANCE_ALGORITHM
public static final String VERTICES_BALANCE_ALGORITHM
public static Collection<PartitionOwner> balancePartitionsAcrossWorkers(org.apache.hadoop.conf.Configuration conf, Collection<PartitionOwner> partitionOwners, Collection<PartitionStats> allPartitionStats, Collection<WorkerInfo> availableWorkerInfos)
conf - Configuration to find the algorithmpartitionOwners - All the owners of all partitionsallPartitionStats - All the partition statsavailableWorkerInfos - All the available workerspublic static PartitionExchange updatePartitionOwners(List<PartitionOwner> partitionOwnerList, WorkerInfo myWorkerInfo, Collection<? extends PartitionOwner> masterSetPartitionOwners)
partitionOwnerList - Local PartitionOwner list for the
                           given workermyWorkerInfo - Worker infomasterSetPartitionOwners - Master set partition owners, received
        prior to beginning the superstepCopyright © 2011-2020 The Apache Software Foundation. All Rights Reserved.