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

Method trimAbove

src/org/apache/pig/impl/plan/OperatorPlan.java:295–309  ·  view source on GitHub ↗

Trim everything above a given operator. The specified operator will NOT be removed. @param op Operator to trim everything before.

(E op)

Source from the content-addressed store, hash-verified

293 * @param op Operator to trim everything before.
294 */
295 public void trimAbove(E op) {
296 List<E> predecessors = new ArrayList<E>(getPredecessors(op));
297 IndexHelper<E> indexHelper = new IndexHelper<E>(predecessors);
298 trimAbove(predecessors);
299 for(E predecessor: predecessors) {
300 try {
301 op.rewire(predecessor, indexHelper.getIndex(predecessor), null, true);
302 } catch (PlanException pe) {
303 //TODO
304 //need to change the method signature to include the exception clause
305 //for now, throwing RunTimeException to workaround this issue
306 throw new RuntimeException("Encountered problems with rewiring operators.", pe);
307 }
308 }
309 }
310
311 private void trimAbove(List<E> ops) {
312 if (ops != null) {

Callers 2

fixReduceSideFEMethod · 0.80
setProjectInputMethod · 0.80

Calls 4

getPredecessorsMethod · 0.95
getIndexMethod · 0.95
removeMethod · 0.95
rewireMethod · 0.80

Tested by

no test coverage detected