List<SimilarItems> similarItemsOfBatch = Lists.newArrayListWithCapacity(itemIDBatch.length);
for (long itemID : itemIDBatch) {
List<RecommendedItem> similarItems = getRecommender().mostSimilarItems(itemID, getSimilarItemsPerItem());
similarItemsOfBatch.add(new SimilarItems(itemID, similarItems));
}
results.offer(similarItemsOfBatch);
if (++numBatchesProcessed % 5 == 0) {