List of usage examples for org.apache.hadoop.mapred.lib CombineFileSplit getOffset
public long getOffset(int i)
From source file:cascading.tap.hadoop.io.CombineFileRecordReaderWrapper.java
License:Open Source License
public CombineFileRecordReaderWrapper(CombineFileSplit split, Configuration conf, Reporter reporter, Integer idx) throws Exception { FileSplit fileSplit = new FileSplit(split.getPath(idx), split.getOffset(idx), split.getLength(idx), split.getLocations());/* w w w . ja v a 2s .co m*/ Class<?> clz = conf.getClass(INDIVIDUAL_INPUT_FORMAT, null); FileInputFormat<K, V> inputFormat = (FileInputFormat<K, V>) clz.newInstance(); if (inputFormat instanceof Configurable) ((Configurable) inputFormat).setConf(conf); delegate = inputFormat.getRecordReader(fileSplit, (JobConf) conf, reporter); }
From source file:org.icgc.dcc.release.core.hadoop.CombineFileRecordReaderWrapper.java
License:Open Source License
protected CombineFileRecordReaderWrapper(FileInputFormat<K, V> inputFormat, CombineFileSplit split, Configuration conf, Reporter reporter, Integer index) throws IOException { val fileSplit = new FileSplit(split.getPath(index), split.getOffset(index), split.getLength(index), split.getLocations());/* w w w .j ava 2s. co m*/ delegate = inputFormat.getRecordReader(fileSplit, (JobConf) conf, reporter); }