public class DefaultPlacementStrategy extends Object implements IDPlacementStrategy
IDPlacementStrategy that assigns all vertices to a fixed partition configured upon construction.
This strategy is used when partitioning is disabled. This strategy is not configurable.| Constructor and Description |
|---|
DefaultPlacementStrategy() |
DefaultPlacementStrategy(int partitionID) |
| Modifier and Type | Method and Description |
|---|---|
void |
exhaustedPartition(int partitionID)
Called when there are no more idAuthorities left in the given partition.
|
int |
getPartition(InternalElement element)
Individually assigns an id to the given vertex or relation.
|
void |
getPartitions(Map<InternalVertex,PartitionAssignment> vertices)
Bulk assignment of idAuthorities to vertices.
|
void |
setLocalPartitionBounds(List<PartitionIDRange> localPartitionIdRanges)
If Titan is embedded, this method is used to indicate to the placement strategy which
part of the partition id space is hosted locally so that vertex and edge placements can be made accordingly
(i.e.
|
boolean |
supportsBulkPlacement()
Whether this placement strategy supports bulk placement.
|
public DefaultPlacementStrategy(int partitionID)
public DefaultPlacementStrategy()
public int getPartition(InternalElement element)
IDPlacementStrategygetPartition in interface IDPlacementStrategyelement - Vertex or relation to assign id to.public void getPartitions(Map<InternalVertex,PartitionAssignment> vertices)
IDPlacementStrategyIDPlacementStrategy.supportsBulkPlacement() first.getPartitions in interface IDPlacementStrategyvertices - Map containing all vertices and their partition placement.public boolean supportsBulkPlacement()
IDPlacementStrategyIDPlacementStrategy.getPartitions(java.util.Map) will throw UnsupportedOperationExceptionsupportsBulkPlacement in interface IDPlacementStrategypublic void setLocalPartitionBounds(List<PartitionIDRange> localPartitionIdRanges)
IDPlacementStrategysetLocalPartitionBounds in interface IDPlacementStrategylocalPartitionIdRanges - List of PartitionIDRanges correspondinging to the locally hosted partitionspublic void exhaustedPartition(int partitionID)
IDPlacementStrategyexhaustedPartition in interface IDPlacementStrategypartitionID - Id of the partition that has been exhausted.Copyright © 2012–2014. All rights reserved.