@Override protected void processNextRecord(Tuple2<HiveKey, V> inputRecord) throws IOException { HiveKey key = inputRecord._1(); V value = inputRecord._2(); if (value instanceof Iterable) { @SuppressWarnings("unchecked") Iterable<BytesWritable> values = (Iterable<BytesWritable>)value; reduceRecordHandler.<BytesWritable>processRow(key, values.iterator()); } else { reduceRecordHandler.processRow(key, value); } }
/** * Process one row using a dummy iterator. */ @Override public void processRow(Object key, final Object value) throws IOException { dummyIterator.setValue(value); processRow(key, dummyIterator); }
@Override protected void processNextRecord(Tuple2<HiveKey, V> inputRecord) throws IOException { HiveKey key = inputRecord._1(); V value = inputRecord._2(); if (value instanceof Iterable) { @SuppressWarnings("unchecked") Iterable<BytesWritable> values = (Iterable<BytesWritable>)value; reduceRecordHandler.<BytesWritable>processRow(key, values.iterator()); } else { reduceRecordHandler.processRow(key, value); } }
/** * Process one row using a dummy iterator. Or, add row to vector batch. */ @Override public void processRow(Object key, final Object value) throws IOException { if (!anyRow) { anyRow = true; } if (vectorized) { processVectorRow(key, value); } else { dummyIterator.setValue(value); processRow(key, dummyIterator); } }
@Override protected void processNextRecord(Tuple2<HiveKey, Iterable<BytesWritable>> inputRecord) throws IOException { reduceRecordHandler.processRow(inputRecord._1(), inputRecord._2().iterator()); }