public RecordReader<Text, SequencedFragment> createRecordReader( InputSplit genericSplit, TaskAttemptContext context) throws IOException, InterruptedException { context.setStatus(genericSplit.toString()); return new QseqRecordReader( ContextUtil.getConfiguration(context), (FileSplit) genericSplit); // cast as per example in TextInputFormat }
// new API init call @Override public void initialize(InputSplit split, TaskAttemptContext context) throws IOException { context.setStatus(split.toString()); init((ESInputSplit) split, context.getConfiguration()); }
/** * Input Split의 파일명을 반환한다. Input Split은 기본적으로 <tt>file + ":" + start + "+" + length</tt> 형식으로 구성되어 * 있다. * * @param inputSplit Input Split * @return 파일명 */ public static String getFilename(InputSplit inputSplit) { String filename = org.openflamingo.mapreduce.util.FileUtils.getFilename(inputSplit.toString()); int start = filename.indexOf(":"); return filename.substring(0, start); }
/** Returns the <code>RecordReader</code> for reading the arc file. */ public RecordReader<Text, ArcRecord> createRecordReader( InputSplit split, TaskAttemptContext context) throws IOException { context.setStatus(split.toString()); return new ArcRecordReader(); }