/// <summary>Add a RecordReader to this collection.</summary> /// <remarks> /// Add a RecordReader to this collection. /// The id() of a RecordReader determines where in the Tuple its /// entry will appear. Adding RecordReaders with the same id has /// undefined behavior. /// </remarks> /// <exception cref="System.IO.IOException"/> public virtual void Add(ComposableRecordReader <K, V> rr) { kids[rr.Id()] = rr; if (null == q) { cmp = WritableComparator.Get(rr.CreateKey().GetType(), conf); q = new PriorityQueue <ComposableRecordReader <K, object> >(3, new _IComparer_136(this )); } if (rr.HasNext()) { q.AddItem(rr); } }
/// <summary> /// For all child RRs offering the key provided, obtain an iterator /// at that position in the JoinCollector. /// </summary> /// <exception cref="System.IO.IOException"/> protected internal virtual void FillJoinCollector(K iterkey) { if (!q.IsEmpty()) { q.Peek().Key(iterkey); while (0 == cmp.Compare(q.Peek().Key(), iterkey)) { ComposableRecordReader <K, object> t = q.Poll(); t.Accept(jc, iterkey); if (t.HasNext()) { q.AddItem(t); } else { if (q.IsEmpty()) { return; } } } } }