code: @Override
      public void initialize(InputSplit genericSplit, TaskAttemptContext context)
              throws IOException, InterruptedException {
          FileSplit split = (FileSplit) genericSplit;
          Configuration job = context.getConfiguration();
          this.maxLineLength = job.getInt("mapred.linerecordreader.maxlength",
                                          Integer.MAX_VALUE);
          start = split.getStart();
          end = start + split.getLength();
          final Path file = split.getPath();
  
          compressionCodecs = new CompressionCodecFactory(job);
          final CompressionCodec codec = compressionCodecs.getCodec(file);
  
          // open the file and seek to the start of the split
          FileSystem fs = file.getFileSystem(job);
          FSDataInputStream fileIn = fs.open(split.getPath());
          boolean skipFirstLine = false;
          if (codec != null) {
              in = new LineReader(codec.createInputStream(fileIn), job);
              end = Long.MAX_VALUE;
          } else {
              if (start != 0) {
                  skipFirstLine = true;
                  --start;
                  fileIn.seek(start);
              }
              in = new LineReader(fileIn, job);
          }
  
          // skip first line and re-establish "start".
          if (skipFirstLine) {
              start += in.readLine(new Text(), 0,
                          (int)Math.min((long)Integer.MAX_VALUE, end - start));
          }
  
          this.fileName = file.getName();
          this.fileLength = fs.getFileStatus(file).getLen();
          this.conf = context.getConfiguration();
          this.pos = start;
          this.separator = conf.get(SimpleJob.SEPARATOR, StringUtil.COMMA);
          this.regex = conf.getBoolean(SimpleJob.SEPARATOR_REGEX, false);
  
          init();
      }
docs: {@inheritDoc}