code: public static void setInputFormat(Class<?> realInputFormatClass, Configuration conf) {
      conf.setClass("mapred.input.format.class", DeprecatedInputFormatWrapper.class, org.apache.hadoop.mapred.InputFormat.class);
      HadoopUtils.setClassConf(conf, CLASS_CONF_KEY, realInputFormatClass);
    }
docs: For cases where we need to set hadoop1 input format in a hadoop2 Configuration object.