Java SDK Documentation
12.0.0
|
Classes | |
enum | CoroutineState |
Public Member Functions | |
final void | cancelUDX (ServerInterface srvInterface) |
void | deinitialize (ServerInterface srvInterface, SizedColumnTypes returnType) |
final void | destroy (ServerInterface srvInterface, SizedColumnTypes returnTypes) |
void | destroy (ServerInterface srvInterface, SizedColumnTypes returnType, SessionParamWriterMap udSessionParams) throws UdfException |
ContinuousReader | getContinuousReader () |
ContinuousRejecter | getContinuousRejector () |
int | getRecordsAcceptedInBatch () |
RejectedRecord | getRejectedRecord () |
boolean | getSeenEOB () |
ServerInterface | getServerInterface () |
StreamWriter | getStreamWriter () |
void | increRecordsAcceptedInBatch () |
void | initialize (ServerInterface srvInterface, SizedColumnTypes returnType) |
boolean | isCanceled () |
final StreamState | process (ServerInterface srvInterface, DataBuffer input, InputState input_state) throws UdfException,DestroyInvocation |
abstract void | run () throws UdfException |
void | setRecordsAcceptedInBatch (int i) |
void | setSeenEOB (Boolean b) |
void | setStreamWriter (StreamWriter writer) |
final void | setup (ServerInterface srvInterface, SizedColumnTypes returnTypes) throws UdfException |
Protected Member Functions | |
void | cancel (ServerInterface srvInterface) |
Protected Attributes | |
int | recordsAcceptedInBatch |
boolean | seen_eob |
StreamWriter | writer |
|
protectedinherited |
Cancel callback to be overridden by the UDX implementation. Called when the query running the UDX has been canceled.
srvInterface | a ServerInterface object used to communicate with Vertica |
Referenced by com.vertica.sdk.UDXObject.cancelUDX().
|
inherited |
Cancel callback invoked when the query running the UDX has been canceled.
See cancel().
srvInterface | a ServerInterface object used to communicate with Vertica |
void com.vertica.sdk.ContinuousUDParser.deinitialize | ( | ServerInterface | srvInterface, |
SizedColumnTypes | returnType | ||
) |
May optionally be overridden Will be invoked during query execution, after run() has returned.
srvInterface | a ServerInterface object. |
returnType | a SizedColumnTypes object. |
Referenced by com.vertica.sdk.ContinuousUDParser.destroy().
final void com.vertica.sdk.ContinuousUDParser.destroy | ( | ServerInterface | srvInterface, |
SizedColumnTypes | returnTypes | ||
) |
De-initialization to be done for ContinuousUDParser.
Note: Internally implemented for ContinuousUDParser. Do not override.
srvInterface | a ServerInterface object. |
returnTypes | a SizedColumnTypes object. |
ContinuousReader com.vertica.sdk.ContinuousUDParser.getContinuousReader | ( | ) |
ContinuousRejecter com.vertica.sdk.ContinuousUDParser.getContinuousRejector | ( | ) |
RejectedRecord com.vertica.sdk.ContinuousUDParser.getRejectedRecord | ( | ) |
ServerInterface com.vertica.sdk.ContinuousUDParser.getServerInterface | ( | ) |
void com.vertica.sdk.ContinuousUDParser.initialize | ( | ServerInterface | srvInterface, |
SizedColumnTypes | returnType | ||
) |
May optionally be overridden Will be invoked during query execution, prior to run() being called. @param srvInterface a ServerInterface object.
returnType | a SizedColumnTypes object. |
Referenced by com.vertica.sdk.ContinuousUDParser.setup().
|
inherited |
Referenced by com.vertica.sdk.UDXObject.cancelUDX().
|
virtual |
Override the built-in process() method with internal logic for ContinuousUDParser. Abstract away the state-machine interface by stuffing run() into a coroutine. Whenever run() wants more data than we have right now, context-switch out of the coroutine and back into process(), and go get whatever run() needs.
Note: Internally implemented for ContinuousUDParser. Do not override.
srvInterface | a ServerInterface Object |
input | a DataBuffer object. |
input_state | an InputState object. |
Implements com.vertica.sdk.UDParser.
|
pure virtual |
Method exposed to user to write their custom code
User-implemented method that processes data. Called exactly once per ContinuousUDParser instance. It should read data using the reserve() and seek() (or read()) methods, and write data using the standard UDParser StreamWriter. It should return once it has either finished processing the input stream, or it (for whatever reason) wants to close the input stream and not process any further data.
run() should be very careful about keeping pointers or references to internal values returned by methods on the ContinuousUDParser class. Unless documentation explicitly indicates that it is safe to do so, it is not safe to keep such pointers or references, even for objects (such as the server interface) that one might otherwise expect to be persistent. Instead, call the accessor function for each use.
final void com.vertica.sdk.ContinuousUDParser.setup | ( | ServerInterface | srvInterface, |
SizedColumnTypes | returnTypes | ||
) | throws UdfException |
Initialization to be done for ContinuousUDParser.
Note: Internally implemented for ContinuousUDParser. Do not override.
srvInterface | a ServerInterface object. |
returnTypes | a SizedColumnTypes object. |
|
protectedinherited |
Writer to write parsed tuples to. Has the same API as PartitionWriter, from the UDT framework.