Kinetica C# API  Version 6.0.1.0
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Properties Pages
kinetica.KineticaIngestor< T > Class Template Reference

Manages the insertion into GPUdb of large numbers of records in bulk, with automatic batch management and support for multi-head ingest. More...

+ Inheritance diagram for kinetica.KineticaIngestor< T >:

Classes

class  InsertException< T >
 
class  WorkerList
 A list of worker URLs to use for multi-head ingest. More...
 

Public Member Functions

 KineticaIngestor (Kinetica kdb, string table_name, int batch_size, KineticaType ktype, Dictionary< string, string > options=null, WorkerList workers=null)
 
Int64 getCountInserted ()
 Returns the count of records inserted so far. More...
 
Int64 getCountUpdated ()
 Returns the count of records updated so far. More...
 
void flush ()
 Ensures that all queued records are inserted into Kinetica. More...
 
void insert (T record)
 Queues a record for insertion into Kinetica. More...
 
void insert (IList< T > records)
 Queues a list of records for insertion into Kientica. More...
 

Public Attributes

Int64 count_inserted
 
Int64 count_updated
 

Properties

Kinetica kineticaDB [get]
 
string table_name [get]
 
int batch_size [get]
 
IDictionary< string, string > options [get]
 

Detailed Description

Manages the insertion into GPUdb of large numbers of records in bulk, with automatic batch management and support for multi-head ingest.

Use the insert(record) and insert(List) methods to queue records for insertion, and the flush method to ensure that all queued records have been inserted.

Template Parameters
TThe type of object being inserted.

Definition at line 18 of file KineticaIngestor.cs.

Constructor & Destructor Documentation

kinetica.KineticaIngestor< T >.KineticaIngestor ( Kinetica  kdb,
string  table_name,
int  batch_size,
KineticaType  ktype,
Dictionary< string, string >  options = null,
WorkerList  workers = null 
)
inline

Parameters
kdb
table_name
batch_size
ktype
options
workers

Definition at line 1407 of file KineticaIngestor.cs.

Member Function Documentation

void kinetica.KineticaIngestor< T >.flush ( )
inline

Ensures that all queued records are inserted into Kinetica.

If an error occurs while inserting the records from any queue, the recoreds will no longer be in that queue nor in Kinetica; catch InsertException{T} to get the list of records that were being inserted if needed (for example, to retry). Other queues may also still contain unflushed records if this occurs.

Exceptions
InsertException{T}

Definition at line 1542 of file KineticaIngestor.cs.

Int64 kinetica.KineticaIngestor< T >.getCountInserted ( )
inline

Returns the count of records inserted so far.

An atomic operation.

Returns
The number of records inserted into Kinetica through this ingestor so far.

Definition at line 1516 of file KineticaIngestor.cs.

Int64 kinetica.KineticaIngestor< T >.getCountUpdated ( )
inline

Returns the count of records updated so far.

An atomic operation.

Returns
The number of records updated into Kinetica through this ingestor so far.

Definition at line 1527 of file KineticaIngestor.cs.

void kinetica.KineticaIngestor< T >.insert ( record)
inline

Queues a record for insertion into Kinetica.

If the queue reaches the <member cref="batch_size">, all records in the queue will be inserted into Kinetica before the method returns. If an error occurs while inserting the records, the records will no longer be in the queue nor in Kinetica; catch InsertException{T} to get the list of records that were being inserted if needed (for example, to retry).

Parameters
recordThe record to insert.
Exceptions
InsertException{T}

Definition at line 1608 of file KineticaIngestor.cs.

void kinetica.KineticaIngestor< T >.insert ( IList< T >  records)
inline

Queues a list of records for insertion into Kientica.

If any queue reaches the <member cref="batch_size">, all records in that queue will be inserted into Kinetica before the method returns. If an error occurs while inserting the queued records, the records will no longer be in that queue nor in Kinetica; catch InsertException{T} to get the list of records that were being inserted (including any from the queue in question and any remaining in the list not yet queued) if needed (for example, to retry). Note that depending on the number of records, multiple calls to Kinetica may occur.

Parameters
recordsThe records to insert.
Exceptions
InsertException{T}

Definition at line 1665 of file KineticaIngestor.cs.

Member Data Documentation

Int64 kinetica.KineticaIngestor< T >.count_inserted

Definition at line 1388 of file KineticaIngestor.cs.

Int64 kinetica.KineticaIngestor< T >.count_updated

Definition at line 1389 of file KineticaIngestor.cs.

Property Documentation

int kinetica.KineticaIngestor< T >.batch_size
get

Definition at line 1385 of file KineticaIngestor.cs.

Kinetica kinetica.KineticaIngestor< T >.kineticaDB
get

Definition at line 1383 of file KineticaIngestor.cs.

IDictionary<string, string> kinetica.KineticaIngestor< T >.options
get

Definition at line 1386 of file KineticaIngestor.cs.

string kinetica.KineticaIngestor< T >.table_name
get

Definition at line 1384 of file KineticaIngestor.cs.


The documentation for this class was generated from the following file: