public void setStarts(final Iterator<S> starts) { this.pipe.setStarts(starts); this.starts = starts; }
public MemoizePipe(final Pipe<S, E> pipe, final Map<S, List<E>> map) { this.pipe = pipe; this.pipe.setStarts(this.expando); this.map = map; }
public OptionalPipe(final Pipe<S, ?> pipe) { this.pipe = pipe; this.pipe.setStarts(this.expando); }
/** * Initialize this pipe to apply its conditions to the given pipe. * Each object in the source pipe is fed into the given pipe individually. * * @param pipe The pipe to determine if objects exist after input processed */ public HasNextPipe(final Pipe<S, ?> pipe) { this.pipe = pipe; this.pipe.setStarts(this.expando); }
public FutureFilterPipe(final Pipe<S, ?> pipe) { this.pipe = pipe; this.pipe.setStarts(this.expando); }
public void setStarts(final Iterator<S> starts) { this.starts = starts; this.startPipe.setStarts(starts); }
public BackFilterPipe(final Pipe<S, ?> pipe) { this.pipe = pipe; this.pipe.setStarts(this.expando); }
/** * Useful for constructing the pipeline chain without making use of the constructor. * * @param pipes the ordered list of pipes to chain together into a pipeline */ protected void setPipes(final List<Pipe> pipes) { final int pipelineLength = pipes.size(); this.startPipe = (Pipe<S, ?>) pipes.get(0); this.endPipe = (Pipe<?, E>) pipes.get(pipelineLength - 1); for (int i = 1; i < pipelineLength; i++) { pipes.get(i).setStarts((Iterator) pipes.get(i - 1)); } }
public void setStarts(final Iterator<S> iterator) { this.expando = new ExpandableLoopBundleIterator<S>(iterator); this.pipe.setStarts(this.expando); }
public S processNextStart() { while (true) { final S s = this.starts.next(); for (Pipe<S, Boolean> pipe : this.pipes) { pipe.setStarts(new SingleIterator<S>(s)); if (pipe.next()) { return s; } } } }
public S processNextStart() { while (true) { final S s = this.starts.next(); boolean and = true; for (final Pipe<S, Boolean> pipe : this.pipes) { pipe.setStarts(new SingleIterator<S>(s)); if (!pipe.next()) { and = false; break; } } if (and) return s; } }
if (Vertex.class.isAssignableFrom(setThis.getClass())) { Vertex vertex = (Vertex) setThis; pipe.setStarts(Arrays.asList(vertex)); } else if (Edge.class.isAssignableFrom(setThis.getClass())) { Edge edge = (Edge) setThis; pipe.setStarts(Arrays.asList(edge.getVertex(Direction.IN), edge.getVertex(Direction.OUT))); } else { pipe.setStarts(titanGraph.query().vertices());
public Object call(final Object[] args) { final Object result = args[0]; final Iterator itty; if (result instanceof FaunusPipeline) { try { final FaunusPipeline pipeline = (FaunusPipeline) result; pipeline.submit(); final FileSystem hdfs = FileSystem.get(pipeline.getGraph().getConf()); final Path output = HDFSTools.getOutputsFinalJob(hdfs, pipeline.getGraph().getOutputLocation().toString()); itty = new TextFileLineIterator(hdfs, hdfs.globStatus(new Path(output.toString() + "/" + Tokens.SIDEEFFECT + "*")), LINES); } catch (Exception e) { throw new RuntimeException(e.getMessage(), e); } } else { itty = new ToStringPipe(); ((Pipe) itty).setStarts(new SingleIterator<Object>(result)); } int counter = 0; while (itty.hasNext()) { counter++; this.io.out.println(this.resultPrompt + itty.next()); } if (counter == LINES) this.io.out.println(this.resultPrompt + "..."); return null; } }
((Pipe) result).setStarts(new SingleIterator<Element>(vertex));
((Pipe) result).setStarts(new SingleIterator<Element>(vertex));