Package com.linkedin.alpini.router.api
Interface AsyncPartitionFinder<K>
public interface AsyncPartitionFinder<K>
Created by acurtis on 1/26/18.
-
Method Summary
Modifier and TypeMethodDescriptionstatic <K> AsyncPartitionFinder<K>adapt(PartitionFinder<K> partitionFinder, Executor executor) default CompletionStage<String>findPartitionName(Pair<String, K> resource) findPartitionName(String resourceName, K partitionKey) Returns the name of partition for the given key within the given table.findPartitionNumber(K partitionKey, int numPartitions, String storeName, int versionNumber) Venice-specific API for finding the partition number without the added overhead of parsing a partition name.getAllPartitionNames(String resourceName) getNumPartitions(String resourceName) Returns the number of partitions for a given db
-
Method Details
-
findPartitionName
@Nonnull CompletionStage<String> findPartitionName(@Nonnull String resourceName, @Nonnull K partitionKey) Returns the name of partition for the given key within the given table.- Parameters:
resourceName- name of the databasepartitionKey- partition key field for the data- Returns:
- name of the partition
- Throws:
RouterException- if there was an error
-
findPartitionName
-
getAllPartitionNames
-
getNumPartitions
Returns the number of partitions for a given db- Parameters:
resourceName- name of the database
-
findPartitionNumber
CompletionStage<Integer> findPartitionNumber(K partitionKey, int numPartitions, String storeName, int versionNumber) Venice-specific API for finding the partition number without the added overhead of parsing a partition name. -
adapt
-