LOG.info("Cycle free: " + cycleFree);
}
}
private void removeEventOperator(Set<Operator<?>> component) {
AppMasterEventOperator victim = null;
for (Operator<?> o : component) {
if (o instanceof AppMasterEventOperator) {
if (victim == null
|| o.getConf().getStatistics().getDataSize() < victim.getConf().getStatistics()
.getDataSize()) {
victim = (AppMasterEventOperator) o;
}
}
}
Operator<?> child = victim;
Operator<?> curr = victim;
while (curr.getChildOperators().size() <= 1) {
child = curr;
curr = curr.getParentOperators().get(0);
}
// at this point we've found the fork in the op pipeline that has the
// pruning as a child plan.
LOG.info("Disabling dynamic pruning for: "
+ ((DynamicPruningEventDesc) victim.getConf()).getTableScan().toString()
+ ". Needed to break cyclic dependency");
curr.removeChild(child);
}