/** * Creates a FileDataSink with the provided {@link FileOutputFormat} implementation * and the given name, writing to the file indicated by the given path. * * @param f The {@link FileOutputFormat} implementation used to encode the data. * @param filePath The path to the file to write the contents to. * @param name The given name for the sink, used in plans, logs and progress messages. */ public FileDataSink(FileOutputFormat<Record> f, String filePath, String name) { super(f, new UnaryOperatorInformation<Record, Nothing>(new RecordTypeInfo(), new NothingTypeInfo()), filePath, name); }
/** * Creates a GenericDataSink with the provided {@link OutputFormat} implementation * and the given name. * * @param f The {@link OutputFormat} implementation used to sink the data. * @param name The given name for the sink, used in plans, logs and progress messages. */ public GenericDataSink(OutputFormat<Record> f, String name) { super(f, new UnaryOperatorInformation<Record, Nothing>(new RecordTypeInfo(), new NothingTypeInfo()), name); }
SingleRootJoiner() { super(new NoOpBinaryUdfOp<Nothing>(new NothingTypeInfo())); setDegreeOfParallelism(1); setSubtasksPerInstance(1); }
SingleRootJoiner() { super(new NoOpBinaryUdfOp<Nothing>(new NothingTypeInfo())); setDegreeOfParallelism(1); setSubtasksPerInstance(1); }
/** * Creates a GenericDataSink with the provided {@link OutputFormat} implementation * and the given name. * * @param f The {@link OutputFormat} implementation used to sink the data. * @param name The given name for the sink, used in plans, logs and progress messages. */ public GenericDataSink(Class<? extends OutputFormat<Record>> f, String name) { super(new UserCodeClassWrapper<OutputFormat<Record>>(f), new UnaryOperatorInformation<Record, Nothing>(new RecordTypeInfo(), new NothingTypeInfo()), name); }
/** * Creates a FileDataSink with the provided {@link FileOutputFormat} implementation * and the given name, writing to the file indicated by the given path. * * @param f The {@link FileOutputFormat} implementation used to encode the data. * @param filePath The path to the file to write the contents to. * @param name The given name for the sink, used in plans, logs and progress messages. */ public FileDataSink(Class<? extends FileOutputFormat<Record>> f, String filePath, String name) { super(new UserCodeClassWrapper<FileOutputFormat<Record>>(f), new UnaryOperatorInformation<Record, Nothing>(new RecordTypeInfo(), new NothingTypeInfo()), filePath, name); }
public SinkJoiner(OptimizerNode input1, OptimizerNode input2) { super(new NoOpBinaryUdfOp<Nothing>(new NothingTypeInfo())); PactConnection conn1 = new PactConnection(input1, this); PactConnection conn2 = new PactConnection(input2, this); this.input1 = conn1; this.input2 = conn2; setDegreeOfParallelism(1); setSubtasksPerInstance(1); }
public SinkJoiner(OptimizerNode input1, OptimizerNode input2) { super(new NoOpBinaryUdfOp<Nothing>(new NothingTypeInfo())); PactConnection conn1 = new PactConnection(input1, this); PactConnection conn2 = new PactConnection(input2, this); this.input1 = conn1; this.input2 = conn2; setDegreeOfParallelism(1); setSubtasksPerInstance(1); }
protected GenericDataSinkBase<T> translateToDataFlow(Operator<T> input) { // select the name (or create a default one) String name = this.name != null ? this.name : this.format.toString(); GenericDataSinkBase<T> sink = new GenericDataSinkBase<T>(this.format, new UnaryOperatorInformation<T, Nothing>(this.type, new NothingTypeInfo()), name); // set input sink.setInput(input); // set dop if(this.dop > 0) { // use specified dop sink.setDegreeOfParallelism(this.dop); } else { // if no dop has been specified, use dop of input operator to enable chaining sink.setDegreeOfParallelism(input.getDegreeOfParallelism()); } return sink; }
/** * @param criterion */ public <X> void setTerminationCriterion(Operator<X> criterion) { CollectorMapOperatorBase<X, Nothing, TerminationCriterionMapper<X>> mapper = new CollectorMapOperatorBase<X, Nothing, TerminationCriterionMapper<X>>( new TerminationCriterionMapper<X>(), new UnaryOperatorInformation<X, Nothing>(criterion.getOperatorInfo().getOutputType(), new NothingTypeInfo()), "Termination Criterion Aggregation Wrapper"); mapper.setInput(criterion); this.terminationCriterion = mapper; this.getAggregators().registerAggregationConvergenceCriterion(TERMINATION_CRITERION_AGGREGATOR_NAME, TerminationCriterionAggregator.class, TerminationCriterionAggregationConvergence.class); }
/** * @param criterion */ public <X> void setTerminationCriterion(Operator<X> criterion) { CollectorMapOperatorBase<X, Nothing, TerminationCriterionMapper<X>> mapper = new CollectorMapOperatorBase<X, Nothing, TerminationCriterionMapper<X>>( new TerminationCriterionMapper<X>(), new UnaryOperatorInformation<X, Nothing>(criterion.getOperatorInfo().getOutputType(), new NothingTypeInfo()), "Termination Criterion Aggregation Wrapper"); mapper.setInput(criterion); this.terminationCriterion = mapper; this.getAggregators().registerAggregationConvergenceCriterion(TERMINATION_CRITERION_AGGREGATOR_NAME, TerminationCriterionAggregator.class, TerminationCriterionAggregationConvergence.class); }