/** * Creates and returns a CrossOperator from using the values given * to the builder. * * @return The created operator */ @Override public CrossWithLargeOperator build() { setNameIfUnset(); return new CrossWithLargeOperator(this); } }
/** * Creates and returns a CrossOperator from using the values given * to the builder. * * @return The created operator */ public CrossOperator build() { setNameIfUnset(); return new CrossOperator(this); }
/** * Creates and returns a CrossOperator from using the values given * to the builder. * * @return The created operator */ @Override public CrossWithSmallOperator build() { setNameIfUnset(); return new CrossWithSmallOperator(this); } }
public static void main(String[] args) throws Exception { GenericDataSource<UserGeneratingInputFormat> source = new GenericDataSource<UserGeneratingInputFormat>(UserGeneratingInputFormat.class); MapOperator mapper = MapOperator.builder(new NumberExtractingMapper()) .input(source).name("le mapper").build(); ReduceOperator reducer = ReduceOperator.builder(new ConcatenatingReducer(), IntValue.class, 1) .input(mapper).name("le reducer").build(); GenericDataSink sink = new GenericDataSink(PrintingOutputFormat.class, reducer); Plan p = new Plan(sink); p.setDefaultParallelism(4); LocalExecutor.execute(p); }
public void setVertexInput(Operator<Record> c) { this.iteration.setInitialSolutionSet(c); this.iteration.setInitialWorkset(c); }
/** * 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 FileDataSink with the provided {@link FileOutputFormat} implementation the default name, * writing to the file indicated by the given path. It uses the given contract as its input. * * @param f The {@link FileOutputFormat} implementation used to encode the data. * @param filePath The path to the file to write the contents to. * @param input The contract to use as the input. */ public FileDataSink(FileOutputFormat<Record> f, String filePath, Operator<Record> input) { this(f, filePath); setInput(input); }
/** * Creates a GenericDataSink with the provided {@link OutputFormat} implementation and the given name. * It uses the given operator as its input. * * @param f The {@link OutputFormat} implementation used to sink the data. * @param input The operator to use as the input. * @param name The given name for the sink, used in plans, logs and progress messages. */ public GenericDataSink(Class<? extends OutputFormat<Record>> f, Operator<Record> input, String name) { this(f, name); setInput(input); }
@Override public Class<? extends Key<?>>[] getKeyClasses() { return emptyClassArray(); }
public PartialSolutionPlaceHolder(BulkIterationBase<Record> container) { super(container, OperatorInfoHelper.unary()); } }
@Override public Class<? extends Key<?>>[] getKeyClasses() { return emptyClassArray(); }
/** * 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 FileDataSink with the provided {@link FileOutputFormat} implementation and the given name, * writing to the file indicated by the given path. It uses the given contract as its input. * * @param f The {@link FileOutputFormat} implementation used to encode the data. * @param filePath The path to the file to write the contents to. * @param input The contract to use as the input. * @param name The given name for the sink, used in plans, logs and progress messages. */ public FileDataSink(Class<? extends FileOutputFormat<Record>> f, String filePath, Operator<Record> input, String name) { this(f, filePath, name); setInput(input); }
/** * Creates a GenericDataSink with the provided {@link OutputFormat} implementation and the given name. * It uses the given operator as its input. * * @param f The {@link OutputFormat} implementation used to sink the data. * @param input The operator to use as the input. * @param name The given name for the sink, used in plans, logs and progress messages. */ public GenericDataSink(OutputFormat<Record> f, Operator<Record> input, String name) { this(f, name); setInput(input); }
/** * 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, 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 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()); }