final PreparedQuery preparedQuery = dataStore.prepare(new Query(kind).setKeysOnly().setFilter(
new FilterPredicate(ROOT_JOB_KEY_PROPERTY, EQUAL, rootJobKey)));
tryFiveTimes(new Operation<Void>("delete") {
@Override
public Void call() {
Iterator<Entity> iter = preparedQuery.asIterator(fetchOptions);
while (iter.hasNext()) {
ArrayList<Key> keys = new ArrayList<>(chunkSize);
for (int i = 0; i < chunkSize && iter.hasNext(); i++) {
keys.add(iter.next().getKey());
}