code: public static Set<String> addInputPath(Job job, Path path, InputFormat inputFormat, Mapper mapperInstance,
        Map<String, String> specificContext, int inputId) throws FileNotFoundException, IOException {
  
      Set<String> instanceFiles = new HashSet<String>();
      // Serialize the Mapper instance
      String uniqueNameMapper = UUID.randomUUID().toString() + '.' + "mapper.dat";
      try {
        InstancesDistributor.distribute(mapperInstance, uniqueNameMapper, job.getConfiguration());
        instanceFiles.add(uniqueNameMapper);
      } catch (URISyntaxException e) {
        throw new IOException(e);
      }
      // Serialize the Input Format
      String uniqueNameInputFormat = UUID.randomUUID().toString() + '.' + "inputFormat.dat";
      try {
        InstancesDistributor.distribute(inputFormat, uniqueNameInputFormat, job.getConfiguration());
        instanceFiles.add(uniqueNameInputFormat);
      } catch (URISyntaxException e) {
        throw new IOException(e);
      }
      for (Map.Entry<String, String> contextKeyValue : specificContext.entrySet()) {
        PangoolMultipleInputs.addInputContext(job, uniqueNameInputFormat, contextKeyValue.getKey(), contextKeyValue
            .getValue(), inputId);
      }
      addInputPath(job, path, uniqueNameInputFormat, inputId);
      Configuration conf = job.getConfiguration();
      conf.set(PANGOOL_INPUT_DIR_MAPPERS_PREFIX_CONF + path.toString() + "." + inputId, uniqueNameMapper);
      job.setMapperClass(DelegatingMapper.class);
      return instanceFiles;
    }
docs: Add a {@link Path} with a custom {@link InputFormat} and {@link Mapper} to
  the list of inputs for the map-reduce job. Returns the instance files
  created.
  
  @param job
  The {@link Job}
  @param path
  {@link Path} to be added to the list of inputs for the job
  @param inputFormat
  {@link InputFormat} class to use for this path
  @param mapperInstance
  {@link Mapper} instance to use
  @inputId An integer identifier that can be used to make every assignment
  unique. Otherwise the same input path can't be associated with
  more than one mapper (advanced usage).
  @throws IOException
  @throws FileNotFoundException