Vertica documentation is moving! Use our new documentation site at https://docs.rocketsoftware.com/bundle/vertica_24.1/page/index.html

com.vertica.sdk.DFSFileWriter Class Reference

Collaboration diagram for com.vertica.sdk.DFSFileWriter:

Public Member Functions
DFSFileWriter (DFSFile dfsFile)
void close () throws UdfException, DestroyInvocation
boolean isOpen ()
void open () throws UdfException, DestroyInvocation
int write (ByteBuffer buffer) throws UdfException, DestroyInvocation

Member Function Documentation

◆close()

void com.vertica.sdk.DFSFileWriter.close() throws UdfException, DestroyInvocation

Closes the file opened for writing.

Exceptions

  • UdfException: UDF problem
  • DestroyInvocation: vertica canceling – do not catch or handle

◆open()

void com.vertica.sdk.DFSFileWriter.open() throws UdfException, DestroyInvocation

Opens a file for writing.

Exceptions

  • UdfException: UDF problem
  • DestroyInvocation: vertica canceling – do not catch or handle

◆write()

int com.vertica.sdk.DFSFileWriter.write(ByteBuffer buffer) throws UdfException, DestroyInvocation

Writes bytes into the file from the ByteBuffer

Bytes are retrieved from the buffer starting from the current position till it's limit. Current position will be advanced depending on how many bytes are written.

Parameters

  • buffer: the ByteBuffer to write

Returns number of bytes written, could be 0.

Exceptions

  • UdfException: UDF problem
  • DestroyInvocation: vertica canceling – do not catch or handle