MCPcopy Create free account
hub / github.com/apache/pig / removeEdges

Method removeEdges

src/org/apache/pig/impl/plan/OperatorPlan.java:394–410  ·  view source on GitHub ↗
(E op,
                             MultiMap<E, E> fromMap,
                             MultiMap<E, E> toMap)

Source from the content-addressed store, hash-verified

392 }
393
394 private void removeEdges(E op,
395 MultiMap<E, E> fromMap,
396 MultiMap<E, E> toMap) {
397 // Find all of the from edges, as I have to remove all the associated to
398 // edges. Need to make a copy so we can delete from the map without
399 // screwing up our iterator.
400 Collection<E> c = fromMap.get(op);
401 if (c == null) return;
402
403 ArrayList<E> al = new ArrayList<E>(c);
404 Iterator<E> i = al.iterator();
405 while (i.hasNext()) {
406 E to = i.next();
407 toMap.remove(to, op);
408 fromMap.remove(op, to);
409 }
410 }
411
412 private void checkInPlan(E op) throws PlanException {
413 if (mOps.get(op) == null) {

Callers 1

removeMethod · 0.95

Calls 5

getMethod · 0.65
iteratorMethod · 0.65
removeMethod · 0.65
hasNextMethod · 0.45
nextMethod · 0.45

Tested by

no test coverage detected