code: public static void saveMapFileSequences(String path, JavaRDD<List<List<Writable>>> rdd, int interval,
                       Integer maxOutputFiles) {
          Configuration c = new Configuration();
          c.set(MAP_FILE_INDEX_INTERVAL_KEY, String.valueOf(interval));
          saveMapFileSequences(path, rdd, c, maxOutputFiles);
      }
docs: Save a {@code JavaRDD<List<List<Writable>>>} to a Hadoop {@link org.apache.hadoop.io.MapFile}. Each record is
  given a <i>unique and contiguous</i> {@link LongWritable} key, and values are stored as
  {@link SequenceRecordWritable} instances.<br>
  <b>Note</b>: If contiguous keys are not required, using a sequence file instead is preferable from a performance
  point of view. Contiguous keys are often only required for non-Spark use cases, such as with
  {@link org.datavec.hadoop.records.reader.mapfile.MapFileSequenceRecordReader}<br>
  <p>
  Use {@link #restoreMapFileSequences(String, JavaSparkContext)} to restore values saved with this method.
  
  @param path     Path to save the MapFile
  @param rdd      RDD to save
  @param interval The map file index interval to use. Smaller values may result in the faster look up, at the
  expense of more memory/disk use. However, usually the increase is relatively minor, due to
  keys being stored as LongWritable objects
  @see #saveMapFileSequences(String, JavaRDD)
  @see #saveSequenceFile(String, JavaRDD)