@Override public RecordReader<Key,Value> createRecordReader(InputSplit inputSplit, TaskAttemptContext context) throws IOException, InterruptedException { log.setLevel(getLogLevel(context)); return new AbstractRecordReader<Key,Value>() { @Override public boolean nextKeyValue() throws IOException, InterruptedException { if (scannerIterator.hasNext()) { ++numKeysRead; Map.Entry<Key,Value> entry = scannerIterator.next(); currentK = currentKey = entry.getKey(); currentV = entry.getValue(); if (log.isTraceEnabled()) log.trace("Processing key/value pair: " + DefaultFormatter.formatEntry(entry, true)); return true; } return false; } @Override protected List<IteratorSetting> contextIterators(TaskAttemptContext context, String tableName) { return getInputTableConfig(context, tableName).getIterators(); } }; } }
@Override public RecordReader<Key,Value> createRecordReader(InputSplit inputSplit, TaskAttemptContext context) throws IOException, InterruptedException { log.setLevel(getLogLevel(context)); return new AbstractRecordReader<Key,Value>() { @Override public boolean nextKeyValue() throws IOException, InterruptedException { if (scannerIterator.hasNext()) { ++numKeysRead; Map.Entry<Key,Value> entry = scannerIterator.next(); currentK = currentKey = entry.getKey(); currentV = entry.getValue(); if (log.isTraceEnabled()) log.trace("Processing key/value pair: " + DefaultFormatter.formatEntry(entry, true)); return true; } return false; } @Override protected List<IteratorSetting> contextIterators(TaskAttemptContext context, String tableName) { return getInputTableConfig(context, tableName).getIterators(); } }; } }
@Override public RecordReader<Key,Value> createRecordReader(InputSplit inputSplit, TaskAttemptContext context) throws IOException, InterruptedException { log.setLevel(getLogLevel(context)); return new AbstractRecordReader<Key,Value>() { @Override public boolean nextKeyValue() throws IOException, InterruptedException { if (scannerIterator.hasNext()) { ++numKeysRead; Map.Entry<Key,Value> entry = scannerIterator.next(); currentK = currentKey = entry.getKey(); currentV = entry.getValue(); if (log.isTraceEnabled()) log.trace("Processing key/value pair: " + DefaultFormatter.formatEntry(entry, true)); return true; } return false; } @Override protected List<IteratorSetting> contextIterators(TaskAttemptContext context, String tableName) { return getInputTableConfig(context, tableName).getIterators(); } }; } }