code: public void initialize(InputSplit split, TaskAttemptContext context)
              throws IOException, InterruptedException {
  
          if (!(split instanceof FileSplit)) {
              throw new IllegalArgumentException(
                      "Only compatible with FileSplits.");
          }
  
          FileSplit fileSplit = (FileSplit) split;
          final Path file = fileSplit.getPath();
          start = fileSplit.getStart();
          end = start + fileSplit.getLength();
  
          Configuration jobConf = context.getConfiguration();
          FileSystem fs = file.getFileSystem(jobConf);
          filein = fs.open(fileSplit.getPath());
  
          // The reader must be able to read past the last byte of a split if a
          // record spans this split and the next. This is why the length passed
          // to the reader is from split start to end of file (not end of split)
          long readLen = fs.getFileStatus(fileSplit.getPath()).getLen()
                  - (start > 0 ? start - 1 : 0);
          datumReader = new ZosVarRdwDatumReader < T >(filein, readLen,
                  cobolContext, cobolType, customChoiceStrategy, schema);
  
          if (start > 0) {
              // This is a subsequent split
              --start;
  
              // Position at the start of a record
              filein.seek(start);
              datumReader.seekRecordStart(recordMatcher);
          }
  
      }
docs: {@inheritDoc}