public class SimpleBulkPlacementStrategy extends Object implements IDPlacementStrategy
| Modifier and Type | Field and Description |
|---|---|
static ConfigOption<Integer> |
CONCURRENT_PARTITIONS |
static int |
PARTITION_FINDING_ATTEMPTS |
| Constructor and Description |
|---|
SimpleBulkPlacementStrategy(Configuration config) |
SimpleBulkPlacementStrategy(int concurrentPartitions) |
| 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 static final ConfigOption<Integer> CONCURRENT_PARTITIONS
public static final int PARTITION_FINDING_ATTEMPTS
public SimpleBulkPlacementStrategy(int concurrentPartitions)
public SimpleBulkPlacementStrategy(Configuration config)
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.