if (bookmark != null) {
logger.info("Proceeding query from bookmark: {}", bookmark);
query.startCursor(Cursor.fromWebSafeString(bookmark));
}
QueryResultIterable queryResult = query.fetchKeys();
QueryResultIterator iterator = queryResult.iterator();
List<Key<?>> keysToFetch = new ArrayList<Key<?>>();
while (iterator.hasNext()) {
keysToFetch.add((Key) iterator.next());
if (keysToFetch.size() > 999) {