C++ SDK Documentation  9.3.0
Vertica::UnsizedUDSource Class Referenceabstract

Base class for UDSource. Use, with IterativeSourceFactory, if computing the size of a source up front would be prohibitively expensive, or if the number of distinct sources would be prohibitively large to use the standard API. Typically you should use UDSource instead. More...

Inheritance diagram for Vertica::UnsizedUDSource:
Inheritance graph
Collaboration diagram for Vertica::UnsizedUDSource:
Collaboration graph

Public Member Functions

void cancelUDX (ServerInterface &srvInterface)
 
virtual void destroy (ServerInterface &srvInterface)
 
virtual void destroy (ServerInterface &srvInterface, SessionParamWriterMap &udSessionParams)
 
virtual Portion getPortion ()=0
 
virtual std::string getUri ()
 
bool isCanceled () const
 
virtual StreamState process (ServerInterface &srvInterface, DataBuffer &output)=0
 
virtual size_t requestMinBufferSize (ServerInterface &srvInterface)
 
virtual void setup (ServerInterface &srvInterface)
 

Static Public Attributes

static const size_t DEFAULT_MIN_BUFFER_SIZE = 1024 * 1024
 

Protected Member Functions

virtual void cancel (ServerInterface &srvInterface)
 

Detailed Description

Base class for UDSource. Use, with IterativeSourceFactory, if computing the size of a source up front would be prohibitively expensive, or if the number of distinct sources would be prohibitively large to use the standard API. Typically you should use UDSource instead.

Not intended or optimized for typical applications.

Member Function Documentation

virtual void Vertica::UDXObject::cancel ( ServerInterface &  srvInterface)
inlineprotectedvirtualinherited

Cancel callback to be overridden by the UDX. Called when the query running the UDX has been canceled.

Note
  • This method will be invoked at most once per UDX object. Once a UDX object has been canceled, it will never be un-canceled.
  • This method may be called from a separate thread, concurrently with other methods of this UDX object (but never the constructor or destructor). Implementations must be thread-safe with all methods of this UDX.
  • This method will be invoked for either an explicit user cancel, or in the event of an error during query execution.

Referenced by Vertica::UDXObject::cancelUDX().

void Vertica::UDXObject::cancelUDX ( ServerInterface &  srvInterface)
inlineinherited

Cancel callback invoked when the query running the UDX has been canceled. See cancel().

virtual Portion Vertica::UnsizedUDSource::getPortion ( )
pure virtual

Return the portion this source object is responsible for (if any).

This can be used by other elements of the load stack to determine how much data to process. It also will uniquely identify a source in the load_sources view. As such, this will be called BEFORE setup() (for load_sources) and again after setup() (for data processing).

Implemented in Vertica::UDSource.

virtual std::string Vertica::UnsizedUDSource::getUri ( )
inlinevirtual

UnsizedUDSource::getUri()

Return the URI of the current source of data.

This function will be invoked during execution to fill in monitoring information.

bool Vertica::UDXObject::isCanceled ( ) const
inlineinherited
Returns
true iff this UDX has been canceled
virtual size_t Vertica::UnsizedUDSource::requestMinBufferSize ( ServerInterface &  srvInterface)
inlinevirtual

Request a minimum buffer size into which this source will read data. This will be called after setup(), before the first call to process().