com.vertica.sdk.SourceIterator Class Reference

List of all members.

Public Member Functions

abstract UnsizedUDSource createNextSource (ServerInterface srvInterface) throws UdfException
 Create the next UDSource to process.
void destroy (ServerInterface srvInterface, NodeSpecifyingPlanContext planCtxt) throws UdfException
 Tear down this SourceIterator.
abstract int getNumberOfSources () throws UdfException
Integer getSizeOfSource (int sourceNum) throws UdfException
void setup (ServerInterface srvInterface, NodeSpecifyingPlanContext planCtxt) throws UdfException
 Set up this SourceIterator.

Detailed Description

Construct a set of Sources. createNextSource() will be called repeatedly until it returns NULL. Each resulting Source will be read to completion, and the contained data passed to the Filter and Parser.


Member Function Documentation

abstract UnsizedUDSource com.vertica.sdk.SourceIterator.createNextSource ( ServerInterface  srvInterface  )  throws UdfException [pure virtual]

Create the next UDSource to process.

Should return NULL if no further sources are available for processing.

Note that the previous Source may still be open and in use on a different thread when this function is called.

Returns:
a new Source instance corresponding to a new input stream
Exceptions:
UdfException 

void com.vertica.sdk.SourceIterator.destroy ( ServerInterface  srvInterface,
NodeSpecifyingPlanContext  planCtxt 
) throws UdfException

Tear down this SourceIterator.

Should perform clean-up

Exceptions:
UdfException 

abstract int com.vertica.sdk.SourceIterator.getNumberOfSources (  )  throws UdfException [pure virtual]

Returns:
the total number of Sources that this factory will produce
Exceptions:
UdfException 

Integer com.vertica.sdk.SourceIterator.getSizeOfSource ( int  sourceNum  )  throws UdfException

Returns:
the raw-data size of the sourceNum'th source that will be produced by createNextSource(). Should return `vint_null` if the size is unknown.
This value is used as a hint, and is used by the "load_streams" table to display load progress. If incorrect or not set, "load_streams" may contain incorrect or unhelpful information.
Exceptions:
UdfException 

void com.vertica.sdk.SourceIterator.setup ( ServerInterface  srvInterface,
NodeSpecifyingPlanContext  planCtxt 
) throws UdfException

Set up this SourceIterator.

Should perform setup that should not take place in the constructor due to the exception-handling semantics of constructors

Exceptions:
UdfException