private void checkIter() { if (internal == null) { internal = closureLocal.getIterator(iteratorNum); } }
protected Iterator getIterator( int i ) { return closure.getIterator( i ); }
@Override public void operate( FlowProcess flowProcess, BufferCall bufferCall ) { JoinerClosure joinerClosure = bufferCall.getJoinerClosure(); if( joinerClosure.size() != 2 ) throw new IllegalArgumentException( "joiner size wrong" ); Iterator<Tuple> lhs = joinerClosure.getIterator( 0 ); while( lhs.hasNext() ) { Tuple lhsTuple = lhs.next(); Iterator<Tuple> rhs = joinerClosure.getIterator( 1 ); while( rhs.hasNext() ) { Tuple rhsTuple = rhs.next(); Tuple result = new Tuple(); result.addAll( lhsTuple ); result.addAll( rhsTuple ); bufferCall.getOutputCollector().add( result ); } } } }