Inheritance diagram for com.vertica.sdk.SourceFactory:

Public Member Functions | |
| Override UDXType | getUDXFactoryType () |
| boolean | isSourceApportionable () |
| Override void | plan (ServerInterface srvInterface, NodeSpecifyingPlanContext planCtxt) throws UdfException |
| SourceIterator | prepare (ServerInterface srvInterface, NodeSpecifyingPlanContext planCtxt) throws UdfException |
| abstract ArrayList< UDSource > | prepareUDSources (ServerInterface srvInterface, NodeSpecifyingPlanContext planCtxt) throws UdfException |
When implementing the factories for a UDSource, you have two options:
| boolean com.vertica.sdk.IterativeSourceFactory.isSourceApportionable | ( | ) | [inherited] |
Return if this source factory has the capability to generate source with portions
| UdfException |
| Override void com.vertica.sdk.SourceFactory.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().
| srvInterface | Interface to server operations and functionality, including (not-per-column) parameter lookup | |
| planCtxt | Context for storing and retrieving arbitrary data, for use just by this instance of this query. The same context is shared with plan(). Also provides functionality for specifying which nodes this query will run on. |
| UdfException |
Reimplemented from com.vertica.sdk.IterativeSourceFactory.
| SourceIterator com.vertica.sdk.SourceFactory.prepare | ( | ServerInterface | srvInterface, | |
| NodeSpecifyingPlanContext | planCtxt | |||
| ) | throws UdfException [virtual] |
INTERNAL
Implements com.vertica.sdk.IterativeSourceFactory.
| abstract ArrayList<UDSource> com.vertica.sdk.SourceFactory.prepareUDSources | ( | ServerInterface | srvInterface, | |
| NodeSpecifyingPlanContext | planCtxt | |||
| ) | throws UdfException [pure virtual] |
Create UDSources. 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.
Unlike the standard SourceFactory, this method directly instantiates all of its UDSources, and returns a vector of them. This requires that all UDSources be resident in memory for the duration of the query, which is fine in the common case but which may not be acceptable for some resource-intensive UDSources.
| srvInterface | Interface to server operations and functionality, including (not-per-column) parameter lookup | |
| planCtxt | Context for storing and retrieving arbitrary data, for use just by this instance of this query. The same context is shared with plan(). Also provides functionality for determining which nodes this query is running on. |
| UdfException |