/** * Logically splits the set of input files for the job, splits N lines of * the input as one split. * * @see FileInputFormat#getSplits(JobContext) */ @Override public final List<InputSplit> getSplits(JobContext job) throws IOException { boolean debug = LOGGER.isDebugEnabled(); if (debug && FileInputFormat.getInputDirRecursive(job)) { LOGGER.debug("Recursive searching for input data is enabled"); } List<InputSplit> splits = new ArrayList<InputSplit>(); int numLinesPerSplit = NLineInputFormat.getNumLinesPerSplit(job); for (FileStatus status : listStatus(job)) { if (debug) { LOGGER.debug("Determining how to split input file/directory {}", status.getPath()); } splits.addAll(NLineInputFormat.getSplitsForFile(status, job.getConfiguration(), numLinesPerSplit)); } return splits; } }
/** * Logically splits the set of input files for the job, splits N lines of * the input as one split. * * @see FileInputFormat#getSplits(JobContext) */ @Override public final List<InputSplit> getSplits(JobContext job) throws IOException { boolean debug = LOGGER.isDebugEnabled(); if (debug && FileInputFormat.getInputDirRecursive(job)) { LOGGER.debug("Recursive searching for input data is enabled"); } List<InputSplit> splits = new ArrayList<InputSplit>(); int numLinesPerSplit = NLineInputFormat.getNumLinesPerSplit(job); for (FileStatus status : listStatus(job)) { if (debug) { LOGGER.debug("Determining how to split input file/directory {}", status.getPath()); } splits.addAll(NLineInputFormat.getSplitsForFile(status, job.getConfiguration(), numLinesPerSplit)); } return splits; } }
boolean recursive = getInputDirRecursive(job);
boolean recursive = getInputDirRecursive(job);
boolean recursive = getInputDirRecursive(job);
boolean recursive = getInputDirRecursive(job);