I'm using Java to query Azure Table and I'd like to retrieve all entities with a given partitionid using the following code. However as there are the following restriction in Azure Table, I'd like to know how they should be resolved. The restrictions I'm concerned are:
1) As Azure Table has paging mechanism in place, if a partition contains more a certain number of entities (I believe it's 1000), it return the first 1000 entities. How can I get all the records in m code.
2) As the entries per second for each partition is 2000, what happens if the partition contains more than 2000 entries and multiple instances of my application queries the same partition at the same time?
String partitionFilter = TableQuery.generateFilterCondition(
"PartitionKey",
QueryComparisons.EQUAL,
term);
TableQuery<AzureTableDFEntity> partitionQuery =
TableQuery.from(AzureTableDFEntity.class)
.where(partitionFilter);
// Loop through the results
int count = 0;
for (AzureTableDFEntity entity : cloudTableIDF.execute(partitionQuery)) {
count++;
}