com.vertica.sdk.DefaultSourceIterator Class Reference

Inheritance diagram for com.vertica.sdk.DefaultSourceIterator:

Collaboration diagram for com.vertica.sdk.DefaultSourceIterator:

Public Member Functions
DefaultSourceIterator (ArrayList sources)
final void cancelUDX (ServerInterface srvInterface)
UnsizedUDSource createNextSource (ServerInterface srvInterface)
void destroy (ServerInterface srvInterface, NodeSpecifyingPlanContext planCtxt) throws UdfException
int getNumberOfSources ()
Integer getSizeOfSource (int sourceNum)
boolean isCanceled ()
void setup (ServerInterface srvInterface, NodeSpecifyingPlanContext planCtxt) throws UdfException
Protected Member Functions
void cancel (ServerInterface srvInterface)

Member Function Documentation

void com.vertica.sdk.UDXObject.cancel(ServerInterface srvInterface)

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

  • 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). 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.

Parameters

  • srvInterface: a ServerInterface object used to communicate with Vertica

Referenced by com.vertica.sdk.UDXObject.cancelUDX().

final void com.vertica.sdk.UDXObject.cancelUDX(ServerInterface srvInterface)

inherited Cancel callback invoked when the query running the UDX has been canceled.

See cancel().

Parameters

  • srvInterface: a ServerInterface object used to communicate with Vertica
UnsizedUDSource com.vertica.sdk.DefaultSourceIterator.createNextSource(ServerInterface srvInterface)

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.

Parameters

  • srvInterface: a ServerInterface object used to communicate with Vertica

Returns a new Source instance corresponding to a new input stream

Exceptions

  • UdfException: UDF problem

Implements com.vertica.sdk.SourceIterator.

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

inherited Tear down this SourceIterator

Should perform clean-up

Parameters

  • srvInterface: a ServerInterface object used to communicate with Vertica
  • planCtxt: a plan context

Exceptions

  • UdfException: UDF problem
int com.vertica.sdk.DefaultSourceIterator.getNumberOfSources()

virtual

Returns the total number of Sources that this factory will produce

Exceptions

  • UdfException: UDF problem

Implements com.vertica.sdk.SourceIterator.

boolean com.vertica.sdk.UDXObject.isCanceled()

inherited Returns true if execution was canceled.

Referenced by com.vertica.sdk.UDXObject.cancelUDX().

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

inherited Set up this SourceIterator

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

Parameters

  • srvInterface: a ServerInterface object used to communicate with Vertica
  • planCtxt: a plan context

Exceptions

  • UdfException: UDF problem