Scanner C++ API
Public Member Functions | Public Attributes | List of all members
scanner::Sink Class Referenceabstract

Interface for reading data in a computation graph. More...

#include <sink.h>

Inheritance diagram for scanner::Sink:
scanner::internal::ColumnSink

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

Profilerprofiler_ = nullptr
 

Detailed Description

Interface for reading data in a computation graph.

Sink are how Scanner's computation graphs read data from outside the system.

Member Function Documentation

virtual void scanner::Sink::new_stream ( const std::vector< u8 > &  args)
inlinevirtual

Called when the Sink is about to process a new stream.

Parameters
argsthe arguments that were bound to this output for this stream

Reimplemented in scanner::internal::ColumnSink.

virtual void scanner::Sink::validate ( proto::Result *  result)
inlinevirtual

Checks if Sink arguments are valid.

Only useful if your Sink has its own custom Protobuf arguments.

virtual void scanner::Sink::write ( const BatchedElements &  input_columns)
pure virtual

Runs the Sink to write elements.

Parameters
input_columnssink input, vector of elements produced by an Op

Implemented in scanner::internal::ColumnSink.

Member Data Documentation

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.


The documentation for this class was generated from the following file: