com.vertica.sdk.IterativeSourceFactory Class Reference

Inheritance diagram for com.vertica.sdk.IterativeSourceFactory:

com.vertica.sdk.SourceFactory List of all members.

Public Member Functions

Override UDXType getUDXFactoryType ()
boolean isSourceApportionable ()
void plan (ServerInterface srvInterface, NodeSpecifyingPlanContext planCtxt) throws UdfException
abstract SourceIterator prepare (ServerInterface srvInterface, NodeSpecifyingPlanContext planCtxt) throws UdfException

Detailed Description

High-level initialization required by a UDSource.

Performs initial validation and planning of the query, before it is distributed over the network. Also instantiates objects to perform further initialization on each node, once the query has been distributed.

Note that SourceFactories are singletons. Subclasses should be stateless, with no fields containing data, just methods. plan() and prepare() methods must never modify any global variables or state; they may only modify the variables that they are given as arguments. (If global state must be modified, use SourceIterator.)


Member Function Documentation

boolean com.vertica.sdk.IterativeSourceFactory.isSourceApportionable (  ) 

Return if this source factory has the capability to generate source with portions

Exceptions:
UdfException 

void com.vertica.sdk.IterativeSourceFactory.plan ( ServerInterface  srvInterface,
NodeSpecifyingPlanContext  planCtxt 
) throws UdfException

Execute any planning logic required at query plan time. This method is run once per query, during query initialization. Its job is to perform parameter validation, and to modify the set of nodes that the COPY statement will run on.

plan() runs exactly once per query, on the initiator node. If it throws an exception, the query will not proceed; it will be aborted prior to distributing the query to the other nodes and running prepare().

Exceptions:
UdfException 

Reimplemented in com.vertica.sdk.SourceFactory.

abstract SourceIterator com.vertica.sdk.IterativeSourceFactory.prepare ( ServerInterface  srvInterface,
NodeSpecifyingPlanContext  planCtxt 
) throws UdfException [pure virtual]

Prepare this SourceFactory to start creating sources. This function will be called on each node, prior to the Load operator starting to execute and prior to any other virtual functions on this class being called.

If necessary, it is safe for this method to store any of the argument references as local fields on this instance. All will persist for the duration of the query.

Exceptions:
UdfException 

Implemented in com.vertica.sdk.SourceFactory.