List of usage examples for org.apache.hadoop.mapred.lib CombineFileSplit getLength
public long getLength(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());/*from w ww . j a v a 2 s .c o 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:com.ricemap.spateDB.mapred.SpatialRecordReader.java
License:Apache License
/** * Initialize from an input split/*w w w .ja va2 s . c o m*/ * @param split * @param conf * @param reporter * @param index * @throws IOException */ public SpatialRecordReader(CombineFileSplit split, Configuration conf, Reporter reporter, Integer index) throws IOException { this(conf, split.getStartOffsets()[index], split.getLength(index), split.getPath(index)); }
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());//from ww w. ja v a 2 s.c om delegate = inputFormat.getRecordReader(fileSplit, (JobConf) conf, reporter); }