public static <T> LocalCallbackSink<T> createStdoutSink(Class<T> typeClass) { return new LocalCallbackSink<>(System.out::println, typeClass); }
/** * Copies an instance (exclusive of broadcasts). * * @param that that should be copied */ public LocalCallbackSink(LocalCallbackSink<T> that) { super(that); this.callback = that.getCallback(); }
@Override public Optional<CardinalityEstimator> createCardinalityEstimator( final int outputIndex, final Configuration configuration) { Validate.inclusiveBetween(0, this.getNumOutputs() - 1, outputIndex); return super.createCardinalityEstimator(outputIndex, configuration); } }
public static <T> LocalCallbackSink<T> createCollectingSink(Collection<T> collector, DataSetType<T> type) { return new LocalCallbackSink<>(collector::add, type); }
public static <T> LocalCallbackSink<T> createStdoutSink(DataSetType<T> type) { return new LocalCallbackSink<>(System.out::println, type); }
public static <T> LocalCallbackSink<T> createCollectingSink(Collection<T> collector, Class<T> typeClass) { return new LocalCallbackSink<>(collector::add, typeClass); }
private SubplanPattern createSubplanPattern() { final OperatorPattern operatorPattern = new OperatorPattern( "sink", new LocalCallbackSink<>(null, DataSetType.none()), false ); return SubplanPattern.createSingleton(operatorPattern); }
private SubplanPattern createSubplanPattern() { final OperatorPattern operatorPattern = new OperatorPattern( "sink", new LocalCallbackSink<>(null, DataSetType.none()), false); return SubplanPattern.createSingleton(operatorPattern); }