/** * Creates a {@code Source<T>} instance for the text file(s) at the given path name using * the provided {@code PType<T>} to convert the input text. * * @param pathName The name of the path to the data on the filesystem * @param ptype The {@code PType<T>} to use to process the input text * @return A new {@code Source<T>} instance */ public static <T> Source<T> textFile(String pathName, PType<T> ptype) { return textFile(new Path(pathName), ptype); }
/** * Creates a {@code Source<String>} instance for the text file(s) at the given path name. * * @param pathName The name of the path to the data on the filesystem * @return A new {@code Source<String>} instance */ public static Source<String> textFile(String pathName) { return textFile(new Path(pathName)); }
/** * Creates a {@code Source<String>} instance for the text file(s) at the given path name. * * @param pathName The name of the path to the data on the filesystem * @return A new {@code Source<String>} instance */ public static Source<String> textFile(String pathName) { return textFile(new Path(pathName)); }
/** * Creates a {@code Source<T>} instance for the text file(s) at the given path name using * the provided {@code PType<T>} to convert the input text. * * @param pathName The name of the path to the data on the filesystem * @param ptype The {@code PType<T>} to use to process the input text * @return A new {@code Source<T>} instance */ public static <T> Source<T> textFile(String pathName, PType<T> ptype) { return textFile(new Path(pathName), ptype); }
public static Source<String> textFile(String pathName) { return textFile(new Path(pathName)); }
public static <T> Source<T> textFile(String pathName, PType<T> ptype) { return textFile(new Path(pathName), ptype); }
/** * Creates a {@code Source<String>} instance for the text file(s) at the given {@code Path}s. * * @param paths A list of {@code Path}s to the data * @return A new {@code Source<String>} instance */ public static Source<String> textFile(List<Path> paths) { return textFile(paths, Writables.strings()); }
/** * Creates a {@code Source<String>} instance for the text file(s) at the given {@code Path}. * * @param path The {@code Path} to the data * @return A new {@code Source<String>} instance */ public static Source<String> textFile(Path path) { return textFile(path, Writables.strings()); }
/** * Creates a {@code Source<String>} instance for the text file(s) at the given {@code Path}. * * @param path The {@code Path} to the data * @return A new {@code Source<String>} instance */ public static Source<String> textFile(Path path) { return textFile(path, Writables.strings()); }
public PCollection<String> readTextFile(String pathName) { return read(From.textFile(pathName)); }
public static Source<String> textFile(Path path) { return textFile(path, Writables.strings()); }
public PCollection<String> readTextFile(String pathName) { return read(From.textFile(pathName)); }
return pipeline.read(source); } else if (opts.inputFileFormat.isAssignableFrom(TextInputFormat.class)) { Source source = From.textFile(filePaths); return pipeline.read(source); } else {