* @throws IOException
* if an I/O error occurred while accessing the file or initializing the InputFormat.
*/
public static <T, IS extends InputSplit, F extends InputFormat<T, IS>> F openInput(
Class<F> inputFormatClass, Configuration configuration) throws IOException {
configuration = configuration == null ? new Configuration() : configuration;
final F inputFormat = ReflectionUtil.newInstance(inputFormatClass);
inputFormat.configure(configuration);
final IS[] splits = inputFormat.createInputSplits(1);
inputFormat.open(splits[0]);