com.vertica.sdk.StreamWriter Class Reference

Inheritance diagram for com.vertica.sdk.StreamWriter:

com.vertica.sdk.PartitionWriter com.vertica.sdk.VerticaBlock List of all members.

Public Member Functions

void addCol (ByteBuffer arg, ByteBuffer da, int colstride, VerticaType dt, String colName)
void addCol (ByteBuffer arg, ByteBuffer da, int colstride, VerticaType dt)
void addCol (ByteBuffer arg, int colstride, VerticaType dt)
void addCol (ByteBuffer arg, int colstride, VerticaType dt, String colName)
void copyFromInput (int dstIdx, PartitionReader input_reader, int srcIdx) throws UdfException
ByteBuffer getColDataAreaRef (int idx)
ByteBuffer getColRef (int idx)
int getNumCols ()
VNumeric getNumericWriter (int idx)
int getNumRows ()
VString getStringWriter (int idx)
long getTotalRowCount ()
SizedColumnTypes getTypeMetaData ()
abstract boolean getWriteableBlock () throws UdfException, DestroyInvocation
boolean next () throws UdfException, DestroyInvocation
void resetBuffers ()
void setBoolean (int idx, boolean r)
void setBooleanNull (int idx)
void setDate (int idx, java.sql.Date r)
void setDateNull (int idx)
void setDouble (int idx, double r)
void setDoubleNull (int idx)
void setLong (int idx, long r)
void setLongNull (int idx)
void setNumeric (int idx, BigDecimal bd)
void setNumericNull (int idx)
void setString (int idx, String r)
void setStringNull (int idx)
void setTimestamp (int idx, java.sql.Timestamp r)
void setTimestampInfiniteNeg (int idx)
void setTimestampInfinitePos (int idx)
void setTimestampNull (int idx)
 StreamWriter (int nargs)

Public Attributes

int count
int index
int ncols
SizedColumnTypes typeMetaData

Protected Member Functions

void clear ()
long getRowSize (SizedColumnTypes types)
void setRowCount (SizedColumnTypes types)

Static Protected Member Functions

static long blockSizeGivenRowSize (long row_size)

Protected Attributes

ArrayList< ByteBuffer > coldataareas
ArrayList< ByteBuffer > cols
ArrayList< Integer > colstrides
long cumulative_rows
ArrayList< Integer > currentPos

Detailed Description

StreamWriter provides an iterator-based write interface over output data for a stream of blocks. Automatically makes space a block-at-a-time, as needed.


Member Function Documentation

void com.vertica.sdk.VerticaBlock.addCol ( ByteBuffer  arg,
ByteBuffer  da,
int  colstride,
VerticaType  dt,
String  colName 
) [inherited]

Add the location for reading a particular argument.

Parameters:
arg The base location to find data.
da The location to find out of band string data.
colstride The stride between data instances.
dt The type of input.
colName Name of the column

void com.vertica.sdk.VerticaBlock.addCol ( ByteBuffer  arg,
ByteBuffer  da,
int  colstride,
VerticaType  dt 
) [inherited]

Add the location for reading a particular argument.

Parameters:
arg The base location to find data.
da The location to find out of band string data.
colstride The stride between data instances.
dt The type of input.

void com.vertica.sdk.VerticaBlock.addCol ( ByteBuffer  arg,
int  colstride,
VerticaType  dt 
) [inherited]

Add the location for reading a particular argument.

Parameters:
arg The base location to find data.
colstride The stride between data instances.
dt The type of input.

void com.vertica.sdk.VerticaBlock.addCol ( ByteBuffer  arg,
int  colstride,
VerticaType  dt,
String  colName 
) [inherited]

Add the location for reading a particular argument.

Parameters:
arg The base location to find data.
colstride The stride between data instances.
dt The type of input.
colName Name of the column

void com.vertica.sdk.PartitionWriter.copyFromInput ( int  dstIdx,
PartitionReader  input_reader,
int  srcIdx 
) throws UdfException [inherited]

Copies a column from the input reader to the output writer. The data types and sizes of the source and destination columns must match exactly.

Parameters:
dstIdx The destination column index (in the output writer)
input_reader The input reader from which to copy a column
srcIdx The source column index (in the input reader)

ByteBuffer com.vertica.sdk.VerticaBlock.getColDataAreaRef ( int  idx  )  [inherited]

Get the ByteBuffer that stores out of line string data (Data Area) for the idx'th argument

Parameters:
idx 
Returns:

ByteBuffer com.vertica.sdk.VerticaBlock.getColRef ( int  idx  )  [inherited]

Returns:
a ByteBuffer to the idx'th argument, containing data for the column
Example:

 ByteBuffer a = arg_reader.getColPtr(0);

int com.vertica.sdk.VerticaBlock.getNumCols (  )  [inherited]

Returns:
the number of arguments held by this reader.

int com.vertica.sdk.VerticaBlock.getNumRows (  )  [inherited]

Returns:
the number of rows held by this block.

SizedColumnTypes com.vertica.sdk.VerticaBlock.getTypeMetaData (  )  [inherited]

Returns:
information about the types and numbers of arguments

abstract boolean com.vertica.sdk.StreamWriter.getWriteableBlock (  )  throws UdfException, DestroyInvocation [pure virtual]

Gets a writeable block of data and positions cursor at the beginning.

Implements com.vertica.sdk.PartitionWriter.

void com.vertica.sdk.PartitionWriter.setLong ( int  idx,
long  r 
) [inherited]

Setter methods