/** Called with all map output values with a given key. By default, pairs * key with each value, collecting {@link Pair} instances. */ @SuppressWarnings("unchecked") public void reduce(K key, Iterable<V> values, AvroCollector<OUT> collector, Reporter reporter) throws IOException { if (outputPair == null) outputPair = new Pair<>(AvroJob.getOutputSchema(getConf())); for (V value : values) { outputPair.set(key, value); collector.collect((OUT)outputPair); } }
@Override public final void reduce(AvroKey<K> key, Iterator<AvroValue<V>> values, OutputCollector<KO, VO> out, Reporter reporter) throws IOException { if (this.collector == null) this.collector = getCollector(out); reduceIterable.values = values; reducer.reduce(key.datum(), reduceIterable, collector, reporter); }
@Override public void close() throws IOException { this.reducer.close(); } }
@Override public void setConf(Configuration conf) super.setConf(conf); if (conf == null)
public void setConf(Configuration conf) super.setConf(conf); if (conf == null)
@Override public final void reduce(AvroKey<K> key, Iterator<AvroValue<V>> values, OutputCollector<KO, VO> out, Reporter reporter) throws IOException { if (this.collector == null) this.collector = getCollector(out); reduceIterable.values = values; reducer.reduce(key.datum(), reduceIterable, collector, reporter); }
/** Called with all map output values with a given key. By default, pairs * key with each value, collecting {@link Pair} instances. */ @SuppressWarnings("unchecked") public void reduce(K key, Iterable<V> values, AvroCollector<OUT> collector, Reporter reporter) throws IOException { if (outputPair == null) outputPair = new Pair<K,V>(AvroJob.getOutputSchema(getConf())); for (V value : values) { outputPair.set(key, value); collector.collect((OUT)outputPair); } }
@Override public void setConf(Configuration conf) super.setConf(conf); if (conf == null)
@Override public void close() throws IOException { this.reducer.close(); } }
@Override public final void reduce(AvroKey<K> key, Iterator<AvroValue<V>> values, OutputCollector<KO, VO> out, Reporter reporter) throws IOException { if (this.collector == null) this.collector = getCollector(out); reduceIterable.values = values; reducer.reduce(key.datum(), reduceIterable, collector, reporter); }
/** Called with all map output values with a given key. By default, pairs * key with each value, collecting {@link Pair} instances. */ @SuppressWarnings("unchecked") public void reduce(K key, Iterable<V> values, AvroCollector<OUT> collector, Reporter reporter) throws IOException { if (outputPair == null) outputPair = new Pair<K,V>(AvroJob.getOutputSchema(getConf())); for (V value : values) { outputPair.set(key, value); collector.collect((OUT)outputPair); } }
public void setConf(Configuration conf) super.setConf(conf); if (conf == null)