Scanner C++ API
|
Interface for reading data in a computation graph. More...
#include <sink.h>
Public Member Functions | |
Sink (const SinkConfig &config) | |
virtual void | validate (proto::Result *result) |
Checks if Sink arguments are valid. More... | |
virtual void | new_stream (const std::vector< u8 > &args) |
Called when the Sink is about to process a new stream. More... | |
virtual void | write (const BatchedElements &input_columns)=0 |
Runs the Sink to write elements. More... | |
virtual void | finished () |
When this function returns, the data for all previous 'write' calls MUST BE durably written. | |
virtual void | set_profiler (Profiler *profiler) |
For internal use. | |
Public Attributes | |
Profiler * | profiler_ = nullptr |
Interface for reading data in a computation graph.
Sink are how Scanner's computation graphs read data from outside the system.
|
inlinevirtual |
Called when the Sink is about to process a new stream.
args | the arguments that were bound to this output for this stream |
Reimplemented in scanner::internal::ColumnSink.
|
inlinevirtual |
|
pure virtual |
Runs the Sink to write elements.
input_columns | sink input, vector of elements produced by an Op |
Implemented in scanner::internal::ColumnSink.
Profiler* scanner::Sink::profiler_ = nullptr |
The profiler allows an op to save profiling data for later visualization. It is not guaranteed to be non-null, so check before use.