Retrieves a map of {@link Path}s to the {@link InputFormat} class
that should be used for them.

@param conf The confuration of the job
@see #addInputPath(JobConf, Path, Class)
@return A map of paths to inputformats for the job
325574
static Map<Path, InputFormat> getInputFormatMap(JobConf conf) {
    Map<Path, InputFormat> m = new HashMap<Path, InputFormat>();
    String[] pathMappings = conf.get("mapred.input.dir.formats").split(",");
    for (String pathMapping : pathMappings) {
      String[] split = pathMapping.split(";");
      InputFormat inputFormat;
      try {
       inputFormat = (InputFormat) ReflectionUtils.newInstance(conf
           .getClassByName(split[1]), conf);
      } catch (ClassNotFoundException e) {
       throw new RuntimeException(e);
      }
      m.put(new Path(split[0]), inputFormat);
    }
    return m;
  }
2531
public WindupConfiguration addInputPath(Path inputPath)
    {
        Set<Path> inputPaths = getOptionValue(InputPathOption.NAME);
        if (inputPaths == null)
        {
            inputPaths = new LinkedHashSet<>();
            setOptionValue(InputPathOption.NAME, inputPaths);
        }
        inputPaths.add(inputPath);
        return this;
    }
279933
public static void addFileToClassPath(Path file, Configuration conf)
    throws IOException {
    String classpath = conf.get("mapred.job.classpath.files");
    conf.set("mapred.job.classpath.files", classpath == null ? file.toString()
             : classpath + System.getProperty("path.separator") + file.toString());
    URI uri = file.makeQualified(file.getFileSystem(conf)).toUri();

    addCacheFile(uri, conf);
  }
754529
private static void appendSystemClasspath(JobConf conf,
                                            String pathSeparator,
                                            StringBuffer classPath) {
    // The alternate runtime can be used to debug tasks by putting a
    // custom version of the mapred libraries. This will get loaded before
    // the TT's jars.
    String debugRuntime = conf.get("mapred.task.debug.runtime.classpath");
    if (debugRuntime != null) {
      classPath.append(pathSeparator);
      classPath.append(debugRuntime);
    }
    // Determine system classpath for tasks. Default to tasktracker's
    // classpath.
    String systemClasspath = System.getenv(
      MAPREDUCE_TASK_SYSTEM_CLASSPATH_PROPERTY);
    if (systemClasspath == null) {
      systemClasspath = System.getProperty("java.class.path");
    }
    if (LOG.isDebugEnabled()) {
      LOG.debug("System classpath " + systemClasspath);
    }
    classPath.append(pathSeparator);
    classPath.append(systemClasspath);
  }
457376
public static PathFilter getInputPathFilter(JobContext context) {
    Configuration conf = context.getConfiguration();
    Class<?> filterClass = conf.getClass("mapred.input.pathFilter.class", null,
        PathFilter.class);
    return (filterClass != null) ?
        (PathFilter) ReflectionUtils.newInstance(filterClass, conf) : null;
  }
1347304
public URI getInputMap() {
//       return toURI(getProperty(INPUT_DITAMAP_URI));
        return files.values().stream()
                .filter(fi -> fi.isInput)
                .map(fi -> getInputDir().relativize(fi.src))
                .findAny()
                .orElse(null);
    }
1182057
protected List<String> getSiteConfigPaths(String path) {

        String normalizedPath = CmsStringUtil.joinPaths("/", path, "/");
        List<String> prefixes = new ArrayList<String>();

        List<String> parents = new ArrayList<String>();
        String currentPath = normalizedPath;
        while (currentPath != null) {
            parents.add(currentPath);
            currentPath = CmsResource.getParentFolder(currentPath);
        }

        for (String parent : parents) {
            if (m_siteConfigurationsByPath.containsKey(parent)) {
                prefixes.add(parent);
            }
        }
        Collections.sort(prefixes);
        return prefixes;
    }
1233005
private synchronized Path getInputPath() throws IOException {
        if (sanitizedInputPath == null) {
            // No need to query Hadoop more than once as this shouldn't change mid-run,
            // thus, we can lazily initialize and cache the result.
            Path path = new Path(props.getString(BUILD_INPUT_PATH));
            sanitizedInputPath = HadoopUtils.getSanitizedPath(path);
        }
        return sanitizedInputPath;
    }
904653
@Override
  public Set<ConfigStream> getConfigStreams() throws IOException {
    Set<ConfigStream> configStreams = Sets.newHashSet();
    for (String configPath : getDeployableConfigPaths()) {
      configStreams.add(new ConfigStream(Optional.of(getConfigStream(configPath)),
          StringUtils.substringAfter(Strings.nullToEmpty(configPath), this.classpathRootName + "/")));
    }
    return configStreams;
  }
1156097
public static InputSource getInputSource(File file) {
		try {
			final URL url = file.toURI().toURL();
			return getInputSource(url);
		} catch (MalformedURLException e) {
			return new InputSource(file.getPath());
		}
	}
198534
public static String getInputValueName(
            @Nullable final String inputPrefix,
            @Nonnull final BiMap<String, String> inputMapper,
            @Nonnull final String field) {
        String name = inputMapper == null ? null : inputMapper.inverse().get(field);
        if (name == null) {
            if (inputMapper != null && inputMapper.containsKey(field)) {
                throw new RuntimeException("field in keys");
            }
            final String[] defaultValues = {
                    Values.TASK_DIRECTORY_KEY, Values.CLIENT_HTTP_REQUEST_FACTORY_KEY,
                    Values.TEMPLATE_KEY, Values.PDF_CONFIG_KEY, Values.SUBREPORT_DIR_KEY,
                    Values.OUTPUT_FORMAT_KEY, Values.JOB_ID_KEY
            };
            if (inputPrefix == null || Arrays.asList(defaultValues).contains(field)) {
                name = field;
            } else {
                name = inputPrefix.trim() +
                        Character.toUpperCase(field.charAt(0)) +
                        field.substring(1);
            }
        }
        return name;
    }
407624
public static Path[] getInputPaths(JobContext context) {
    String dirs = context.getConfiguration().get("mapred.input.dir", "");
    String [] list = StringUtils.split(dirs);
    Path[] result = new Path[list.length];
    for (int i = 0; i < list.length; i++) {
      result[i] = new Path(StringUtils.unEscapeString(list[i]));
    }
    return result;
  }
1089707
public static File getPathtoRootmap(final URI traceFilename, final URI inputMap) {
        assert traceFilename.isAbsolute();
        assert inputMap.isAbsolute();
        return toFile(getRelativePath(traceFilename, inputMap)).getParentFile();
    }
47668
public static String compose(Class<? extends InputFormat> inf, String path) {
    return compose(inf.getName().intern(), path, new StringBuffer()).toString();
  }
586075
public static Map<String, String> getClusterNameTags(Configuration conf) {
    ImmutableMap.Builder<String, String> tagMap = ImmutableMap.builder();

    String clusterIdentifierTag = ClustersNames.getInstance().getClusterName(conf);
    if (!Strings.isNullOrEmpty(clusterIdentifierTag)) {
      tagMap.put(CLUSTER_IDENTIFIER_TAG_NAME, clusterIdentifierTag);
    }
    return tagMap.build();
  }
777147
public static void setInputPathFilter(JobConf conf,
                                        Class<? extends PathFilter> filter) {
    conf.setClass("mapred.input.pathFilter.class", filter, PathFilter.class);
  }
560505
public static Path[] getArchiveClassPaths(Configuration conf) {
    String classpath = conf.get("mapred.job.classpath.archives");
    if (classpath == null)
      return null;
    ArrayList list = Collections.list(new StringTokenizer(classpath, System
                                                          .getProperty("path.separator")));
    Path[] paths = new Path[list.size()];
    for (int i = 0; i < list.size(); i++) {
      paths[i] = new Path((String) list.get(i));
    }
    return paths;
  }