Set the array of {@link Path}s as the list of inputs
for the map-reduce job.

@param job The job to modify
@param inputPaths the {@link Path}s of the input directories/files
for the map-reduce job.
426091
public static void setInputPaths(Job job, 
                                   Path... inputPaths) throws IOException {
    Configuration conf = job.getConfiguration();
    FileSystem fs = FileSystem.get(conf);
    Path path = inputPaths[0].makeQualified(fs);
    StringBuffer str = new StringBuffer(StringUtils.escapeString(path.toString()));
    for(int i = 1; i < inputPaths.length;i++) {
      str.append(StringUtils.COMMA_STR);
      path = inputPaths[i].makeQualified(fs);
      str.append(StringUtils.escapeString(path.toString()));
    }
    conf.set("mapred.input.dir", str.toString());
  }
1216360
public void setInputDirs(Path inputDirs) {
    if (_inputDirs == null) {
      _inputDirs = inputDirs;
    } else {
      _inputDirs.append(inputDirs);
    }
  }
20540
public static void addInputContext(Job job, String inputName, String key, String value, int inputId) {
    // Check that this named output has been configured before
    Configuration conf = job.getConfiguration();
    // Add specific configuration
    conf.set(MI_PREFIX + inputName + "." + inputId + CONF + "." + key, value);
  }
909920
public void addInput(Path path, InputFormat inputFormat, TupleMapper inputProcessor) {
		multipleInputs.addInput(new Input(path, inputFormat, inputProcessor, new HashMap<String, String>()));
	}
2458
private void updateJobWithSplit(final JobConf job, InputSplit inputSplit) {
    if (inputSplit instanceof FileSplit) {
      FileSplit fileSplit = (FileSplit) inputSplit;
      job.set("map.input.file", fileSplit.getPath().toString());
      job.setLong("map.input.start", fileSplit.getStart());
      job.setLong("map.input.length", fileSplit.getLength());
    }
    LOG.info("split: " + inputSplit.toString());
  }
1044370
public void setWorkingDirectory(Path dir) {
    if (!dir.isAbsolute()) {
      FileSystem.LogForCollect
          .info("set job working directory to non absolute path: " + dir
              + " working directory: " + getWorkingDirectory());
    }
    dir = new Path(getWorkingDirectory(), dir);
    set("mapred.working.dir", dir.toString());
  }
302010
public void setJobs(java.util.Collection<String> jobs) {
        if (jobs == null) {
            this.jobs = null;
            return;
        }

        this.jobs = new java.util.ArrayList<String>(jobs);
    }
935973
public Set<String> configureJob(Job job) throws FileNotFoundException, IOException, TupleMRException {
		Set<String> instanceFiles = new HashSet<String>();
		for(Output output : getNamedOutputs()) {
			try {
				if(output.isDefault) {
					instanceFiles.add(PangoolMultipleOutputs.setDefaultNamedOutput(job, output.outputFormat,
					    output.keyClass, output.valueClass));
				} else {
					instanceFiles.add(PangoolMultipleOutputs.addNamedOutput(job, output.name, output.outputFormat,
					    output.keyClass, output.valueClass));
				}
			} catch(URISyntaxException e1) {
				throw new TupleMRException(e1);
			}
			for(Map.Entry<String, String> contextKeyValue : output.specificContext.entrySet()) {
				PangoolMultipleOutputs.addNamedOutputContext(job, output.name, contextKeyValue.getKey(),
				    contextKeyValue.getValue());
			}
		}
		return instanceFiles;
	}
106317
public Collection<Path> getInputPaths()
    {
        Collection<Path> inputPaths = getOptionValue(InputPathOption.NAME);
        return inputPaths;
    }
296069
public static void setInputPaths(JobConf conf, Path... inputPaths) {
    if (!inputPaths[0].isAbsolute()) {
      FileSystem.LogForCollect.info("set relative path to non absolute path: "
          + inputPaths[0]+ " working directory: " + conf.getWorkingDirectory());
    }
    Path path = new Path(conf.getWorkingDirectory(), inputPaths[0]);
    StringBuffer str = new StringBuffer(StringUtils.escapeString(path.toString()));
    for(int i = 1; i < inputPaths.length;i++) {
      str.append(StringUtils.COMMA_STR);
      if (!inputPaths[i].isAbsolute()) {
        FileSystem.LogForCollect.info("set input path to non absolute path: "
            + inputPaths[i] + " working directory: "
            + conf.getWorkingDirectory());
      }
      path = new Path(conf.getWorkingDirectory(), inputPaths[i]);
      str.append(StringUtils.escapeString(path.toString()));
    }
    conf.set("mapred.input.dir", str.toString());
  }
643838
public static void setOutputPath(JobConf conf, Path outputDir) {
    if (!outputDir.isAbsolute()) {
      FileSystem.LogForCollect.info("set output path to relative path: "
          + outputDir + " working directory: " + conf.getWorkingDirectory());
    }
    outputDir = new Path(conf.getWorkingDirectory(), outputDir);
    conf.set("mapred.output.dir", outputDir.toString());
  }
559175
public List<InputSplit> getSplits(JobContext job
                                    ) throws IOException {
    long minSize = Math.max(getFormatMinSplitSize(), getMinSplitSize(job));
    long maxSize = getMaxSplitSize(job);

    // generate splits
    List<InputSplit> splits = new ArrayList<InputSplit>();
    for (LocatedFileStatus file: listLocatedStatus(job)) {
      Path path = file.getPath();
      long length = file.getLen();
      BlockLocation[] blkLocations = file.getBlockLocations();

      if ((length != 0) && isSplitable(job, path)) { 
        long blockSize = file.getBlockSize();
        long splitSize = computeSplitSize(blockSize, minSize, maxSize);

        long bytesRemaining = length;
        while (((double) bytesRemaining)/splitSize > SPLIT_SLOP) {
          int blkIndex = getBlockIndex(blkLocations, length-bytesRemaining);
          splits.add(new FileSplit(path, length-bytesRemaining, splitSize, 
                                   blkLocations[blkIndex].getHosts()));
          bytesRemaining -= splitSize;
        }
        
        if (bytesRemaining != 0) {
          splits.add(new FileSplit(path, length-bytesRemaining, bytesRemaining, 
                     blkLocations[blkLocations.length-1].getHosts()));
        }
      } else if (length != 0) {
        splits.add(new FileSplit(path, 0, length, blkLocations[0].getHosts()));
      } else { 
        //Create empty hosts array for zero length files
        splits.add(new FileSplit(path, 0, length, new String[0]));
      }
    }
    LOG.debug("Total # of splits: " + splits.size());
    return splits;
  }
224582
public static Path getOutputPath(JobContext job) {
    String name = job.getConfiguration().get("mapred.output.dir");
    return name == null ? null: new Path(name);
  }
228219
public void configure(JobConf job) {
    iconf = new IndexUpdateConfiguration(job);
    mapredTempDir = iconf.getMapredTempDir();
    mapredTempDir = Shard.normalizePath(mapredTempDir);
  }
56927
public void configure(JobConf job) {
    shards = Shard.getIndexShards(new IndexUpdateConfiguration(job));
    map = new HashMap<Shard, Integer>();
    for (int i = 0; i < shards.length; i++) {
      map.put(shards[i], i);
    }
  }
163624
public void setJobs(java.util.Collection<Job> jobs) {
        if (jobs == null) {
            this.jobs = null;
            return;
        }

        this.jobs = new java.util.ArrayList<Job>(jobs);
    }
568165
@SuppressWarnings("deprecation")
  public InputSplit[] getSplits(JobConf job, int numSplits)
    throws IOException {
    LocatedFileStatus[] files = listLocatedStatus(job);
    
    long totalSize = 0;                           // compute total size
    for (FileStatus file: files) {                // check we have valid files
      if (file.isDir()) {
        throw new IOException("Not a file: "+ file.getPath());
      }
      totalSize += file.getLen();
    }

    long goalSize = totalSize / (numSplits == 0 ? 1 : numSplits);
    long minSize = Math.max(job.getLong("mapred.min.split.size", 1),
                            minSplitSize);

    // generate splits
    ArrayList<FileSplit> splits = new ArrayList<FileSplit>(numSplits);
    NetworkTopology clusterMap = new NetworkTopology();
    for (LocatedFileStatus file: files) {
      Path path = file.getPath();
      FileSystem fs = path.getFileSystem(job);
      long length = file.getLen();
      BlockLocation[] blkLocations = file.getBlockLocations();

      if ((length != 0) && isSplitable(fs, path)) { 
        long blockSize = file.getBlockSize();
        long splitSize = computeSplitSize(goalSize, minSize, blockSize);

        long bytesRemaining = length;
        while (((double) bytesRemaining)/splitSize > SPLIT_SLOP) {
          String[] splitHosts = getSplitHosts(blkLocations, 
              length-bytesRemaining, splitSize, clusterMap);
          splits.add(new FileSplit(path, length-bytesRemaining, splitSize, 
              splitHosts));
          bytesRemaining -= splitSize;
        }
        
        if (bytesRemaining != 0) {
          splits.add(new FileSplit(path, length-bytesRemaining, bytesRemaining, 
                     blkLocations[blkLocations.length-1].getHosts()));
        }
      } else if (length != 0) {
        String[] splitHosts = getSplitHosts(blkLocations,0,length,clusterMap);
        splits.add(new FileSplit(path, 0, length, splitHosts));
      } else { 
        //Create empty hosts array for zero length files
        splits.add(new FileSplit(path, 0, length, new String[0]));
      }
    }
    LOG.debug("Total # of splits: " + splits.size());
    return splits.toArray(new FileSplit[splits.size()]);
  }