/// <summary> /// Construct a collector capable of handling the specified number of /// children. /// </summary> public JoinCollector(CompositeRecordReader <K, V, X> _enclosing, int card) { this._enclosing = _enclosing; // Generic array assignment this.iters = new ResetableIterator[card]; for (int i = 0; i < this.iters.Length; ++i) { this.iters[i] = this._enclosing.Empty; } }
/// <exception cref="System.IO.IOException"/> /// <exception cref="System.Exception"/> public override RecordReader CreateRecordReader(InputSplit split, TaskAttemptContext taskContext) { // child types unknowable if (!(split is CompositeInputSplit)) { throw new IOException("Invalid split type:" + split.GetType().FullName); } CompositeInputSplit spl = (CompositeInputSplit)split; int capacity = kids.Count; CompositeRecordReader ret = null; try { if (!rrCstrMap.Contains(ident)) { throw new IOException("No RecordReader for " + ident); } ret = (CompositeRecordReader)rrCstrMap[ident].NewInstance(id, taskContext.GetConfiguration (), capacity, cmpcl); } catch (MemberAccessException e) { throw new IOException(e); } catch (InstantiationException e) { throw new IOException(e); } catch (TargetInvocationException e) { throw new IOException(e); } for (int i = 0; i < capacity; ++i) { ret.Add(((ComposableRecordReader)kids[i].CreateRecordReader(spl.Get(i), taskContext ))); } return((ComposableRecordReader)ret); }
public _IComparer_84(CompositeRecordReader <K, V, X> _enclosing) { this._enclosing = _enclosing; }