public void initialize(InputSplit split, TaskAttemptContext context)
throws IOException, InterruptedException {
key = new LongWritable();
value = new Text();
if (split instanceof FileSplit) {
FileSplit fsplit = (FileSplit) split;
originalEnd = fsplit.getStart() + fsplit.getLength();
Path path = fsplit.getPath();
long fileEnd = path.getFileSystem(context.getConfiguration()).getFileStatus(path).getLen();
FileSplit extendedSplit = new FileSplit(path, fsplit.getStart(),
Math.min(fsplit.getLength() * 10, fileEnd - fsplit.getStart()), fsplit.getLocations());
this.wrapped.initialize(extendedSplit, context);
} else {
throw new RuntimeException("Cannot override a split of type'"+
split.getClass()+"'");