示例#1
0
 /// <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;
     }
 }
示例#2
0
            /// <exception cref="System.IO.IOException"/>
            public override ComposableRecordReader GetRecordReader(InputSplit split, JobConf
                                                                   job, Reporter reporter)
            {
                // 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, job, capacity, cmpcl
                                                                              );
                }
                catch (MemberAccessException e)
                {
                    throw (IOException)Sharpen.Extensions.InitCause(new IOException(), e);
                }
                catch (InstantiationException e)
                {
                    throw (IOException)Sharpen.Extensions.InitCause(new IOException(), e);
                }
                catch (TargetInvocationException e)
                {
                    throw (IOException)Sharpen.Extensions.InitCause(new IOException(), e);
                }
                for (int i = 0; i < capacity; ++i)
                {
                    ret.Add(kids[i].GetRecordReader(spl.Get(i), job, reporter));
                }
                return((ComposableRecordReader)ret);
            }
示例#3
0
 public _IComparer_78(CompositeRecordReader <K, V, X> _enclosing)
 {
     this._enclosing = _enclosing;
 }