/** * Crosses a single value from the first input with N values, all sharing a common key. * Effectively realizes a <i>1:N</i> join. * * @param val1 The value form the <i>1</i> side. * @param firstValN The first of the values from the <i>N</i> side. * @param valsN Iterator over remaining <i>N</i> side values. * @throws Exception Forwards all exceptions thrown by the stub. */ private void crossFirst1withNValues(final T1 val1, final T2 firstValN, final Iterator<T2> valsN, final FlatJoinFunction<T1, T2, O> joinFunction, final Collector<O> collector) throws Exception { T1 copy1 = createCopy(serializer1, val1, this.copy1); joinFunction.join(copy1, firstValN, collector); // set copy and join first element boolean more = true; do { final T2 nRec = valsN.next(); if (valsN.hasNext()) { copy1 = createCopy(serializer1, val1, this.copy1); joinFunction.join(copy1, nRec, collector); } else { joinFunction.join(val1, nRec, collector); more = false; } } while (more); }
/** * Crosses a single value from the second side with N values, all sharing a common key. * Effectively realizes a <i>N:1</i> join. * * @param val1 The value form the <i>1</i> side. * @param firstValN The first of the values from the <i>N</i> side. * @param valsN Iterator over remaining <i>N</i> side values. * @throws Exception Forwards all exceptions thrown by the stub. */ private void crossSecond1withNValues(T2 val1, T1 firstValN, Iterator<T1> valsN, FlatJoinFunction<T1, T2, O> joinFunction, Collector<O> collector) throws Exception { T2 copy2 = createCopy(serializer2, val1, this.copy2); joinFunction.join(firstValN, copy2, collector); // set copy and join first element boolean more = true; do { final T1 nRec = valsN.next(); if (valsN.hasNext()) { copy2 = createCopy(serializer2, val1, this.copy2); joinFunction.join(nRec, copy2, collector); } else { joinFunction.join(nRec, val1, collector); more = false; } } while (more); }
/** * Crosses a single value from the second side with N values, all sharing a common key. * Effectively realizes a <i>N:1</i> join. * * @param val1 The value form the <i>1</i> side. * @param firstValN The first of the values from the <i>N</i> side. * @param valsN Iterator over remaining <i>N</i> side values. * @throws Exception Forwards all exceptions thrown by the stub. */ private void crossSecond1withNValues(T2 val1, T1 firstValN, Iterator<T1> valsN, FlatJoinFunction<T1, T2, O> joinFunction, Collector<O> collector) throws Exception { T2 copy2 = createCopy(serializer2, val1, this.copy2); joinFunction.join(firstValN, copy2, collector); // set copy and join first element boolean more = true; do { final T1 nRec = valsN.next(); if (valsN.hasNext()) { copy2 = createCopy(serializer2, val1, this.copy2); joinFunction.join(nRec, copy2, collector); } else { joinFunction.join(nRec, val1, collector); more = false; } } while (more); }
/** * Crosses a single value from the second side with N values, all sharing a common key. * Effectively realizes a <i>N:1</i> join. * * @param val1 The value form the <i>1</i> side. * @param firstValN The first of the values from the <i>N</i> side. * @param valsN Iterator over remaining <i>N</i> side values. * @throws Exception Forwards all exceptions thrown by the stub. */ private void crossSecond1withNValues(T2 val1, T1 firstValN, Iterator<T1> valsN, FlatJoinFunction<T1, T2, O> joinFunction, Collector<O> collector) throws Exception { T2 copy2 = createCopy(serializer2, val1, this.copy2); joinFunction.join(firstValN, copy2, collector); // set copy and join first element boolean more = true; do { final T1 nRec = valsN.next(); if (valsN.hasNext()) { copy2 = createCopy(serializer2, val1, this.copy2); joinFunction.join(nRec, copy2, collector); } else { joinFunction.join(nRec, val1, collector); more = false; } } while (more); }
/** * Crosses a single value from the second side with N values, all sharing a common key. * Effectively realizes a <i>N:1</i> join. * * @param val1 The value form the <i>1</i> side. * @param firstValN The first of the values from the <i>N</i> side. * @param valsN Iterator over remaining <i>N</i> side values. * @throws Exception Forwards all exceptions thrown by the stub. */ private void crossSecond1withNValues(T2 val1, T1 firstValN, Iterator<T1> valsN, FlatJoinFunction<T1, T2, O> joinFunction, Collector<O> collector) throws Exception { T2 copy2 = createCopy(serializer2, val1, this.copy2); joinFunction.join(firstValN, copy2, collector); // set copy and join first element boolean more = true; do { final T1 nRec = valsN.next(); if (valsN.hasNext()) { copy2 = createCopy(serializer2, val1, this.copy2); joinFunction.join(nRec, copy2, collector); } else { joinFunction.join(nRec, val1, collector); more = false; } } while (more); }
/** * Crosses a single value from the first input with N values, all sharing a common key. * Effectively realizes a <i>1:N</i> join. * * @param val1 The value form the <i>1</i> side. * @param firstValN The first of the values from the <i>N</i> side. * @param valsN Iterator over remaining <i>N</i> side values. * @throws Exception Forwards all exceptions thrown by the stub. */ private void crossFirst1withNValues(final T1 val1, final T2 firstValN, final Iterator<T2> valsN, final FlatJoinFunction<T1, T2, O> joinFunction, final Collector<O> collector) throws Exception { T1 copy1 = createCopy(serializer1, val1, this.copy1); joinFunction.join(copy1, firstValN, collector); // set copy and join first element boolean more = true; do { final T2 nRec = valsN.next(); if (valsN.hasNext()) { copy1 = createCopy(serializer1, val1, this.copy1); joinFunction.join(copy1, nRec, collector); } else { joinFunction.join(val1, nRec, collector); more = false; } } while (more); }
/** * Crosses a single value from the first input with N values, all sharing a common key. * Effectively realizes a <i>1:N</i> join. * * @param val1 The value form the <i>1</i> side. * @param firstValN The first of the values from the <i>N</i> side. * @param valsN Iterator over remaining <i>N</i> side values. * @throws Exception Forwards all exceptions thrown by the stub. */ private void crossFirst1withNValues(final T1 val1, final T2 firstValN, final Iterator<T2> valsN, final FlatJoinFunction<T1, T2, O> joinFunction, final Collector<O> collector) throws Exception { T1 copy1 = createCopy(serializer1, val1, this.copy1); joinFunction.join(copy1, firstValN, collector); // set copy and join first element boolean more = true; do { final T2 nRec = valsN.next(); if (valsN.hasNext()) { copy1 = createCopy(serializer1, val1, this.copy1); joinFunction.join(copy1, nRec, collector); } else { joinFunction.join(val1, nRec, collector); more = false; } } while (more); }
/** * Crosses a single value from the first input with N values, all sharing a common key. * Effectively realizes a <i>1:N</i> join. * * @param val1 The value form the <i>1</i> side. * @param firstValN The first of the values from the <i>N</i> side. * @param valsN Iterator over remaining <i>N</i> side values. * @throws Exception Forwards all exceptions thrown by the stub. */ private void crossFirst1withNValues(final T1 val1, final T2 firstValN, final Iterator<T2> valsN, final FlatJoinFunction<T1, T2, O> joinFunction, final Collector<O> collector) throws Exception { T1 copy1 = createCopy(serializer1, val1, this.copy1); joinFunction.join(copy1, firstValN, collector); // set copy and join first element boolean more = true; do { final T2 nRec = valsN.next(); if (valsN.hasNext()) { copy1 = createCopy(serializer1, val1, this.copy1); joinFunction.join(copy1, nRec, collector); } else { joinFunction.join(val1, nRec, collector); more = false; } } while (more); }
T1 copy1 = this.createCopy(serializer1, firstV1, this.copy1); T2 blockHeadCopy = this.createCopy(serializer2, firstV2, this.blockHeadCopy); T1 spillHeadCopy = null; copy1 = this.createCopy(serializer1, firstV1, this.copy1); joinFunction.join(copy1, nextBlockRec, collector); spillIt.open(); spillHeadCopy = this.createCopy(serializer1, firstV1, this.spillHeadCopy); } else { leftSideIter = spillVals; copy1 = this.createCopy(serializer1, nextSpillVal, this.copy1); T2 copy2 = this.createCopy(serializer2, blockHeadCopy, this.copy2); joinFunction.join(copy1, copy2, collector); copy1 = this.createCopy(serializer1, nextSpillVal, this.copy1); joinFunction.join(copy1, nextBlockRec, collector); copy1 = this.createCopy(serializer1, spillHeadCopy, this.copy1); final T2 nextBlockVal = blockIt.next(); joinFunction.join(copy1, nextBlockVal, collector); copy1 = this.createCopy(serializer1, nextSpillVal, this.copy1); joinFunction.join(copy1, nextBlockVal, collector);
T1 copy1 = this.createCopy(serializer1, firstV1, this.copy1); T2 blockHeadCopy = this.createCopy(serializer2, firstV2, this.blockHeadCopy); T1 spillHeadCopy = null; copy1 = this.createCopy(serializer1, firstV1, this.copy1); joinFunction.join(copy1, nextBlockRec, collector); spillIt.open(); spillHeadCopy = this.createCopy(serializer1, firstV1, this.spillHeadCopy); } else { leftSideIter = spillVals; copy1 = this.createCopy(serializer1, nextSpillVal, this.copy1); T2 copy2 = this.createCopy(serializer2, blockHeadCopy, this.copy2); joinFunction.join(copy1, copy2, collector); copy1 = this.createCopy(serializer1, nextSpillVal, this.copy1); joinFunction.join(copy1, nextBlockRec, collector); copy1 = this.createCopy(serializer1, spillHeadCopy, this.copy1); final T2 nextBlockVal = blockIt.next(); joinFunction.join(copy1, nextBlockVal, collector); copy1 = this.createCopy(serializer1, nextSpillVal, this.copy1); joinFunction.join(copy1, nextBlockVal, collector);
T1 copy1 = this.createCopy(serializer1, firstV1, this.copy1); T2 blockHeadCopy = this.createCopy(serializer2, firstV2, this.blockHeadCopy); T1 spillHeadCopy = null; copy1 = this.createCopy(serializer1, firstV1, this.copy1); joinFunction.join(copy1, nextBlockRec, collector); spillIt.open(); spillHeadCopy = this.createCopy(serializer1, firstV1, this.spillHeadCopy); } else { leftSideIter = spillVals; copy1 = this.createCopy(serializer1, nextSpillVal, this.copy1); T2 copy2 = this.createCopy(serializer2, blockHeadCopy, this.copy2); joinFunction.join(copy1, copy2, collector); copy1 = this.createCopy(serializer1, nextSpillVal, this.copy1); joinFunction.join(copy1, nextBlockRec, collector); copy1 = this.createCopy(serializer1, spillHeadCopy, this.copy1); final T2 nextBlockVal = blockIt.next(); joinFunction.join(copy1, nextBlockVal, collector); copy1 = this.createCopy(serializer1, nextSpillVal, this.copy1); joinFunction.join(copy1, nextBlockVal, collector);
T1 copy1 = this.createCopy(serializer1, firstV1, this.copy1); T2 blockHeadCopy = this.createCopy(serializer2, firstV2, this.blockHeadCopy); T1 spillHeadCopy = null; copy1 = this.createCopy(serializer1, firstV1, this.copy1); joinFunction.join(copy1, nextBlockRec, collector); spillIt.open(); spillHeadCopy = this.createCopy(serializer1, firstV1, this.spillHeadCopy); } else { leftSideIter = spillVals; copy1 = this.createCopy(serializer1, nextSpillVal, this.copy1); T2 copy2 = this.createCopy(serializer2, blockHeadCopy, this.copy2); joinFunction.join(copy1, copy2, collector); copy1 = this.createCopy(serializer1, nextSpillVal, this.copy1); joinFunction.join(copy1, nextBlockRec, collector); copy1 = this.createCopy(serializer1, spillHeadCopy, this.copy1); final T2 nextBlockVal = blockIt.next(); joinFunction.join(copy1, nextBlockVal, collector); copy1 = this.createCopy(serializer1, nextSpillVal, this.copy1); joinFunction.join(copy1, nextBlockVal, collector);