Returns the OutputCollector to be used by a Mapper instance in the chain.

@param output   the original OutputCollector of the task.
@param reporter the reporter of the task.
@return the OutputCollector to be used in the chain.
485766
@SuppressWarnings({"unchecked"})
  public OutputCollector getReducerCollector(OutputCollector output,
                                             Reporter reporter) {
    return new ChainOutputCollector(reducerKeySerialization,
                                    reducerValueSerialization, output,
                                    reporter);
  }
1068009
public RecordReader<DocumentID, LineDocTextAndOp> getRecordReader(
      InputSplit split, JobConf job, Reporter reporter) throws IOException {
    reporter.setStatus(split.toString());
    return new LineDocRecordReader(job, (FileSplit) split);
  }
984268
public Iterator<AbstractJobOutputVertex> getOutputVertices() {

		final Collection<AbstractJobOutputVertex> coll = this.outputVertices.values();

		return coll.iterator();
	}
595222
public void map(K key, V value,
                  OutputCollector<V, K> output, Reporter reporter)
    throws IOException {
    output.collect(value, key);
  }
704515
@Override
    public final Object singleResult(DBCollection dbCollection) {
        MapReduceOutput output = dbCollection.mapReduce(createMapFunction(), createReduceFunction(), null, query);
        Iterable<DBObject> results = output.results();

        try {
            return transformToValue(results);
        } finally {
            output.drop();
        }
    }
1170965
public OutputHandler getOutputHandler()
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
    {
      SibTr.entry(tc, "getOutputHandler");
      SibTr.exit(tc, "getOutputHandler", outputHandler);
    }    
    
    return outputHandler;
  }
116885
public INDArray[] output(MultiDataSetIterator iterator){
        List<INDArray[]> outputs = new ArrayList<>();
        while(iterator.hasNext()){
            MultiDataSet next = iterator.next();
            INDArray[] out = output(false, next.getFeatures(), next.getFeaturesMaskArrays(), next.getLabelsMaskArrays());
            outputs.add(out);
        }
        INDArray[][] arr = outputs.toArray(new INDArray[outputs.size()][0]);
        return DataSetUtil.mergeFeatures(arr, null).getFirst();
    }
1356329
public <T> T output(@NonNull ModelAdapter<T> adapter, INDArray[] input, INDArray[] inputMasks, INDArray[] labelsMasks) {
        val holder = selector.getModelForThisThread();
        Model model = null;
        boolean acquired = false;
        try {
            model = holder.acquireModel();
            acquired = true;
            return adapter.apply(model, input, inputMasks, labelsMasks);
        } catch (InterruptedException e) {
            throw new RuntimeException(e);
        } finally {
            if (model != null && acquired)
                holder.releaseModel(model);
        }
    }
391311
@Cmd
	public Reporter registerReporter(final Reporter reporter) {
		injector.injectMembers(reporter);
		reporters.add(reporter);
		return reporter;
	}
1190364
@SuppressWarnings("unchecked")
   public static <T, R> SerializableSupplier<Collector<T, ?, R>> toSerialSupplierCollect(
      SerializableSupplier supplier) {
      return supplier;
   }
118348
@Override
    public FeatureCollector getCollector() {
        JiraMode mode = featureSettings.isJiraBoardAsTeam() ? JiraMode.Board : JiraMode.Team;
        FeatureCollector collector = FeatureCollector.prototype(mode);
        FeatureCollector existing = featureCollectorRepository.findByName(collector.getName());
        if (existing != null) {
            collector.setLastRefreshTime(existing.getLastRefreshTime());
        }
        return collector;
    }
869902
@SuppressWarnings("unchecked")
  public void run(RecordReader<K1, V1> input, OutputCollector<K2, V2> output,
                  Reporter reporter) throws IOException {
    Application<K1, V1, K2, V2> application = null;
    try {
      RecordReader<FloatWritable, NullWritable> fakeInput = 
        (!Submitter.getIsJavaRecordReader(job) && 
         !Submitter.getIsJavaMapper(job)) ? 
	  (RecordReader<FloatWritable, NullWritable>) input : null;
      application = new Application<K1, V1, K2, V2>(job, fakeInput, output, 
                                                    reporter,
          (Class<? extends K2>) job.getOutputKeyClass(), 
          (Class<? extends V2>) job.getOutputValueClass());
    } catch (InterruptedException ie) {
      throw new RuntimeException("interrupted", ie);
    }
    DownwardProtocol<K1, V1> downlink = application.getDownlink();
    boolean isJavaInput = Submitter.getIsJavaRecordReader(job);
    downlink.runMap(reporter.getInputSplit(), 
                    job.getNumReduceTasks(), isJavaInput);
    boolean skipping = job.getBoolean("mapred.skip.on", false);
    try {
      if (isJavaInput) {
        // allocate key & value instances that are re-used for all entries
        K1 key = input.createKey();
        V1 value = input.createValue();
        downlink.setInputTypes(key.getClass().getName(),
                               value.getClass().getName());
        
        while (input.next(key, value)) {
          // map pair to output
          downlink.mapItem(key, value);
          if(skipping) {
            //flush the streams on every record input if running in skip mode
            //so that we don't buffer other records surrounding a bad record.
            downlink.flush();
          }
        }
        downlink.endOfInput();
      }
      application.waitForFinish();
    } catch (Throwable t) {
      application.abort(t);
    } finally {
      application.cleanup();
    }
  }
549031
public static OutputStreamWriter getWriter(OutputStream out, Charset charset) {
		if (null == out) {
			return null;
		}

		if (null == charset) {
			return new OutputStreamWriter(out);
		} else {
			return new OutputStreamWriter(out, charset);
		}
	}
939712
public void reduce(K2 key, Iterator<V2> values, 
                     OutputCollector<K3, V3> output, Reporter reporter
                     ) throws IOException {
    isOk = false;
    startApplication(output, reporter);
    downlink.reduceKey(key);
    while (values.hasNext()) {
      downlink.reduceValue(values.next());
    }
    if(skipping) {
      //flush the streams on every record input if running in skip mode
      //so that we don't buffer other records surrounding a bad record.
      downlink.flush();
    }
    isOk = true;
  }
1314539
public MultipleResultCollectorContext<DPO> collect(ResultCollector<?, DPO> resultCollector) {
        if (resultCollector != null) {
            addedTriggers.add(resultCollector);
            addedDataProviders.add(resultCollector);
        }

        // Stay in the same context and re-use the same instance because no type has changed
        return this;
    }
1124506
public static Collection<Map<String, Object>> collectify(ObjectMapper mapper, Object source, Class<? extends Collection> targetCollectionType) {
        return collectify(mapper, source, targetCollectionType, String.class, Object.class);
    }
1040668
protected void collect(Object key, TaggedMapOutput aRecord,
                         OutputCollector output, Reporter reporter) throws IOException {
    this.collected += 1;
    addLongValue("collectedCount", 1);
    if (aRecord != null) {
      output.collect(key, aRecord.getData());
      reporter.setStatus("key: " + key.toString() + " collected: " + collected);
      addLongValue("actuallyCollectedCount", 1);
    }
  }