public static <K, V> TableSource<K, V> formattedFile(String path, Class<? extends FileInputFormat> formatClass, PType<K> keyType, PType<V> valueType) { return formattedFile(new Path(path), formatClass, keyType, valueType); }
/** * Creates a {@code TableSource<K, V>} for reading data from files that have custom * {@code FileInputFormat<K, V>} implementations not covered by the provided {@code TableSource} * and {@code Source} factory methods. * * @param pathName The name of the path to the data on the filesystem * @param formatClass The {@code FileInputFormat} implementation * @param keyClass The {@code Writable} to use for the key * @param valueClass The {@code Writable} to use for the value * @return A new {@code TableSource<K, V>} instance */ public static <K extends Writable, V extends Writable> TableSource<K, V> formattedFile( String pathName, Class<? extends FileInputFormat<K, V>> formatClass, Class<K> keyClass, Class<V> valueClass) { return formattedFile(new Path(pathName), formatClass, keyClass, valueClass); }
/** * Creates a {@code TableSource<K, V>} for reading data from files that have custom * {@code FileInputFormat} implementations not covered by the provided {@code TableSource} * and {@code Source} factory methods. * * @param pathName The name of the path to the data on the filesystem * @param formatClass The {@code FileInputFormat} implementation * @param keyType The {@code PType} to use for the key * @param valueType The {@code PType} to use for the value * @return A new {@code TableSource<K, V>} instance */ public static <K, V> TableSource<K, V> formattedFile(String pathName, Class<? extends FileInputFormat<?, ?>> formatClass, PType<K> keyType, PType<V> valueType) { return formattedFile(new Path(pathName), formatClass, keyType, valueType); }
/** * Creates a {@code TableSource<K, V>} for reading data from files that have custom * {@code FileInputFormat<K, V>} implementations not covered by the provided {@code TableSource} * and {@code Source} factory methods. * * @param pathName The name of the path to the data on the filesystem * @param formatClass The {@code FileInputFormat} implementation * @param keyClass The {@code Writable} to use for the key * @param valueClass The {@code Writable} to use for the value * @return A new {@code TableSource<K, V>} instance */ public static <K extends Writable, V extends Writable> TableSource<K, V> formattedFile( String pathName, Class<? extends FileInputFormat<K, V>> formatClass, Class<K> keyClass, Class<V> valueClass) { return formattedFile(new Path(pathName), formatClass, keyClass, valueClass); }
/** * Creates a {@code TableSource<K, V>} for reading data from files that have custom * {@code FileInputFormat} implementations not covered by the provided {@code TableSource} * and {@code Source} factory methods. * * @param pathName The name of the path to the data on the filesystem * @param formatClass The {@code FileInputFormat} implementation * @param keyType The {@code PType} to use for the key * @param valueType The {@code PType} to use for the value * @return A new {@code TableSource<K, V>} instance */ public static <K, V> TableSource<K, V> formattedFile(String pathName, Class<? extends FileInputFormat<?, ?>> formatClass, PType<K> keyType, PType<V> valueType) { return formattedFile(new Path(pathName), formatClass, keyType, valueType); }
/** * Creates a {@code TableSource<K, V>} for reading data from files that have custom * {@code FileInputFormat<K, V>} implementations not covered by the provided {@code TableSource} * and {@code Source} factory methods. * * @param paths A list of {@code Path}s to the data * @param formatClass The {@code FileInputFormat} implementation * @param keyClass The {@code Writable} to use for the key * @param valueClass The {@code Writable} to use for the value * @return A new {@code TableSource<K, V>} instance */ public static <K extends Writable, V extends Writable> TableSource<K, V> formattedFile( List<Path> paths, Class<? extends FileInputFormat<K, V>> formatClass, Class<K> keyClass, Class<V> valueClass) { return formattedFile(paths, formatClass, Writables.writables(keyClass), Writables.writables(valueClass)); }
/** * Creates a {@code TableSource<K, V>} for reading data from files that have custom * {@code FileInputFormat<K, V>} implementations not covered by the provided {@code TableSource} * and {@code Source} factory methods. * * @param The {@code Path} to the data * @param formatClass The {@code FileInputFormat} implementation * @param keyClass The {@code Writable} to use for the key * @param valueClass The {@code Writable} to use for the value * @return A new {@code TableSource<K, V>} instance */ public static <K extends Writable, V extends Writable> TableSource<K, V> formattedFile( Path path, Class<? extends FileInputFormat<K, V>> formatClass, Class<K> keyClass, Class<V> valueClass) { return formattedFile(path, formatClass, Writables.writables(keyClass), Writables.writables(valueClass)); }
/** * Creates a {@code TableSource<K, V>} for reading data from files that have custom * {@code FileInputFormat<K, V>} implementations not covered by the provided {@code TableSource} * and {@code Source} factory methods. * * @param path The {@code Path} to the data * @param formatClass The {@code FileInputFormat} implementation * @param keyClass The {@code Writable} to use for the key * @param valueClass The {@code Writable} to use for the value * @return A new {@code TableSource<K, V>} instance */ public static <K extends Writable, V extends Writable> TableSource<K, V> formattedFile( Path path, Class<? extends FileInputFormat<K, V>> formatClass, Class<K> keyClass, Class<V> valueClass) { return formattedFile(path, formatClass, Writables.writables(keyClass), Writables.writables(valueClass)); }