/** * Creates a new instance for the given file using the given input format, using the default name. * * @param format The {@link InputFormat} implementation used to read the data. */ public GenericDataSource(Class<? extends T> format) { super(format, OperatorInfoHelper.source()); } }
/** * Creates a new instance for the given file using the given file input format. * * @param f The {@link FileInputFormat} implementation used to read the data. * @param filePath The file location. The file path must be a fully qualified URI, including the address schema. * @param name The given name for the Pact, used in plans, logs and progress messages. */ public FileDataSource(FileInputFormat<Record> f, String filePath, String name) { super(f, OperatorInfoHelper.source(), filePath, name); }
/** * Creates a new instance for the given file using the given file input format. * * @param f The {@link FileInputFormat} implementation used to read the data. * @param filePath The file location. The file path must be a fully qualified URI, including the address schema. * @param name The given name for the Pact, used in plans, logs and progress messages. */ public FileDataSource(Class<? extends FileInputFormat<Record>> f, String filePath, String name) { super(f, OperatorInfoHelper.source(), filePath, name); }
/** * Creates a new instance for the given file using the given input format. * * @param format The {@link InputFormat} implementation used to read the data. * @param name The given name for the Pact, used in plans, logs and progress messages. */ public GenericDataSource(T format,String name) { super(format, OperatorInfoHelper.source(), name); }
/** * Creates a new instance for the given file using the given input format. * * @param format The {@link InputFormat} implementation used to read the data. * @param name The given name for the Pact, used in plans, logs and progress messages. */ public GenericDataSource(Class<? extends T> format, String name) { super(format, OperatorInfoHelper.source(), name); }
/** * Creates a new instance for the given file using the given input format. The contract has the default name. * * @param f The {@link FileInputFormat} implementation used to read the data. * @param filePath The file location. The file path must be a fully qualified URI, including the address schema. */ public FileDataSource(FileInputFormat<Record> f, String filePath) { super(f, OperatorInfoHelper.source(), filePath); }
/** * Creates a new instance for the given file using the given input format. The contract has the default name. * * @param f The {@link FileInputFormat} implementation used to read the data. * @param filePath The file location. The file path must be a fully qualified URI, including the address schema. */ public FileDataSource(Class<? extends FileInputFormat<Record>> f, String filePath) { super(f, OperatorInfoHelper.source(), filePath); } }
/** * Creates a new instance for the given file using the given input format, using the default name. * * @param format The {@link InputFormat} implementation used to read the data. */ public GenericDataSource(T format) { super(format, OperatorInfoHelper.source()); }
public <T extends Iterator<?>, Serializable> CollectionDataSource(CollectionInputFormat f, T data, String name) { super(f, OperatorInfoHelper.source(), name); f.setIter(data); }
public CollectionDataSource(CollectionInputFormat f, String name, Object[][] data) { super(f, OperatorInfoHelper.source(), name); Collection<Object> tmp = new ArrayList<Object>(); for (Object o : data) { tmp.add(o); } checkFormat(tmp); f.setData(tmp); }
public CollectionDataSource(CollectionInputFormat f, Collection<?> data, String name) { super(f, OperatorInfoHelper.source(), name); checkFormat(data); f.setData(data); }
/** * Creates a new instance for the given input using the given input format. * * @param f * The {@link CollectionInputFormat} implementation used to read the data. * @param data * The input data. It should be a collection, an array or a serializable iterator. * @param name * The given name for the Pact, used in plans, logs and progress messages. */ public CollectionDataSource(CollectionInputFormat f, String name, Object... data) { super(f, OperatorInfoHelper.source(), name); Collection<Object> tmp = new ArrayList<Object>(); for (Object o : data) { tmp.add(o); } checkFormat(tmp); f.setData(tmp); }
@SuppressWarnings("unchecked") public CollectionDataSource(CollectionInputFormat f, Object... data) { super(f, OperatorInfoHelper.source(), DEFAULT_NAME); if (data.length == 1 && data[0] instanceof Iterator) { f.setIter((Iterator<Object>) data[0]); } else if (data.length == 1 && data[0] instanceof Collection) { checkFormat((Collection<Object>) data[0]); f.setData((Collection<Object>) data[0]); } Collection<Object> tmp = new ArrayList<Object>(); for (Object o : data) { tmp.add(o); } checkFormat(tmp); f.setData(tmp); }