code: public static void addInputPath(JobConf conf, Path path,
        Class<? extends InputFormat> inputFormatClass) {
  
      String inputFormatMapping = path.toString() + ";"
         + inputFormatClass.getName();
      String inputFormats = conf.get("mapred.input.dir.formats");
      conf.set("mapred.input.dir.formats",
         inputFormats == null ? inputFormatMapping : inputFormats + ","
             + inputFormatMapping);
  
      conf.setInputFormat(DelegatingInputFormat.class);
    }
docs: Add a {@link Path} with a custom {@link InputFormat} to the list of
  inputs for the map-reduce job.
  
  @param conf The configuration of the job
  @param path {@link Path} to be added to the list of inputs for the job
  @param inputFormatClass {@link InputFormat} class to use for this path