|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.continuent.tungsten.replicator.loader.Loader
com.continuent.tungsten.replicator.loader.CSVLoader
public class CSVLoader
Load THL events from a series of CSV files
| Field Summary |
|---|
| Fields inherited from class com.continuent.tungsten.replicator.loader.Loader |
|---|
chunkSize, lockTables, params, uri |
| Constructor Summary | |
|---|---|
CSVLoader()
|
|
| Method Summary | |
|---|---|
void |
configure(PluginContext context)
Complete plug-in configuration. |
DBMSEvent |
extract()
Extract the next available DBMSEvent from the CSV file |
DBMSEvent |
extract(java.lang.String eventId)
Extract starting after the event ID provided as an argument. |
java.lang.String |
getCurrentResourceEventId()
Returns the last event ID committed in the database from which we are extracting. |
protected java.lang.String |
getDefaultSchema()
Return the schema to use in the THL events |
protected java.lang.String |
getSourceID()
Return the source ID to use in the THL events |
protected void |
nextTable()
Update variables to point to the next table to load values for |
void |
prepare(PluginContext context)
Prepare plug-in for use. |
protected void |
prepareCurrentTable()
Open the CSV file containing the values for the current table |
protected void |
prepareTableDefinition(java.io.File f)
Parse the table columns and data types from the table definition file |
protected java.lang.String[] |
readNext(java.io.LineNumberReader reader)
Load the next set of CSV values from the file |
void |
release(PluginContext context)
Release all resources used by plug-in. |
void |
setLastEventId(java.lang.String eventId)
Set the value of the last event ID we have processed. |
| Methods inherited from class com.continuent.tungsten.replicator.loader.Loader |
|---|
getChunkSize, getFinishLoadEvent, getLockTables, parseStringValue, setChunkSize, setLockTables, setUri |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CSVLoader()
| Method Detail |
|---|
public void configure(PluginContext context)
throws ReplicatorException,
java.lang.InterruptedException
ReplicatorException - Thrown if configuration is incomplete or
fails
java.lang.InterruptedException
public void prepare(PluginContext context)
throws ReplicatorException,
java.lang.InterruptedException
ReplicatorException - Thrown if resource allocation fails
java.lang.InterruptedException
protected void prepareTableDefinition(java.io.File f)
throws ReplicatorException
f -
ReplicatorException
public void release(PluginContext context)
throws ReplicatorException,
java.lang.InterruptedException
ReplicatorException - Thrown if resource deallocation fails
java.lang.InterruptedException
public void setLastEventId(java.lang.String eventId)
throws ReplicatorException
eventId - Event ID at which to begin extracting
ReplicatorException
protected void nextTable()
throws ReplicatorException
ReplicatorException
protected void prepareCurrentTable()
throws ReplicatorException
ReplicatorException
public DBMSEvent extract()
throws ReplicatorException,
java.lang.InterruptedException
java.io.IOException
ReplicatorException
java.lang.InterruptedException
protected java.lang.String[] readNext(java.io.LineNumberReader reader)
throws java.io.IOException
reader -
java.io.IOException
public DBMSEvent extract(java.lang.String eventId)
throws ReplicatorException,
java.lang.InterruptedException
eventId - Event ID at which to begin extracting
ReplicatorException - Thrown if extractor processing fails
java.lang.InterruptedException - Thrown if the applier is interrupted
public java.lang.String getCurrentResourceEventId()
throws ReplicatorException,
java.lang.InterruptedException
ReplicatorException
java.lang.InterruptedException
protected java.lang.String getSourceID()
throws java.lang.Exception
java.lang.Exception
protected java.lang.String getDefaultSchema()
throws ReplicatorException
ReplicatorException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||