@Override public void map(AvroWrapper<IN> wrapper, NullWritable value, OutputCollector<KO,VO> collector, Reporter reporter) throws IOException { if (this.out == null) this.out = new MapCollector<>(collector, isMapOnly); mapper.map(wrapper.datum(), out, reporter); }
@Override public void map(AvroWrapper<IN> wrapper, NullWritable value, OutputCollector<KO, VO> collector, Reporter reporter) throws IOException { if (mapper == null) { TaggedInputSplit is = (TaggedInputSplit) reporter.getInputSplit(); Class<? extends AvroMapper> mapperClass = is.getMapperClass(); mapper = (AvroMapper<IN,OUT>) ReflectionUtils.newInstance(mapperClass, conf); } if (out == null) out = new MapCollector<OUT,K,V,KO,VO>(collector, isMapOnly); mapper.map(wrapper.datum(), out, reporter); } }
@Override public void map(AvroWrapper<IN> wrapper, NullWritable value, OutputCollector<KO,VO> collector, Reporter reporter) throws IOException { if (this.out == null) this.out = new MapCollector<OUT,K,V,KO,VO>(collector, isMapOnly); mapper.map(wrapper.datum(), out, reporter); }
@Override public void map(AvroWrapper<IN> wrapper, NullWritable value, OutputCollector<KO, VO> collector, Reporter reporter) throws IOException { if (mapper == null) { TaggedInputSplit is = (TaggedInputSplit) reporter.getInputSplit(); Class<? extends AvroMapper> mapperClass = is.getMapperClass(); mapper = (AvroMapper<IN,OUT>) ReflectionUtils.newInstance(mapperClass, conf); } if (out == null) out = new MapCollector<OUT,K,V,KO,VO>(collector, isMapOnly); mapper.map(wrapper.datum(), out, reporter); } }