Package com.illumon.iris.importers
Class BaseImporter<IAT extends StandardImporterArguments>
java.lang.Object
com.illumon.iris.importers.BaseImporter<IAT>
- Type Parameters:
IAT- The actual class that extends StandardImporterArguments
- Direct Known Subclasses:
BinaryStoreImporter,ExampleImporter
Abstract base class for importers. Handles most of the boilerplate.
Implementing classes will need to implement
processData(),
and will most likely want to extend StandardImporterArguments.
processData() will acquire data from a source and feed it to the
TableWriter via TableWriter.getSetter.
set()
and TableWriter.writeRow().-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedBaseImporter(com.fishlib.io.logger.Logger log, IAT arguments) Construct the BaseImporter. -
Method Summary
Modifier and TypeMethodDescriptionprotected voiddoImport()Execute the steps for an import to a specific location.protected voidWrap up the import process.protected IATGet the importer arguments, in the actual parameterized type.protected TableDefinitionAccessor for table definitionprotected TableWriterAccessor for TableWriter.protected abstract voidImport the data - e.g.
-
Field Details
-
log
protected final com.fishlib.io.logger.Logger log
-
-
Constructor Details
-
BaseImporter
Construct the BaseImporter.- Parameters:
log- use this Logger for feedbackarguments- importer arguments defining the import run
-
-
Method Details
-
getImporterArguments
Get the importer arguments, in the actual parameterized type.- Returns:
- the parsed importer arguments
-
getTableWriter
Accessor for TableWriter.- Returns:
- the TableWriter
-
getTableDefinition
Accessor for table definition- Returns:
- the TableDefinition
-
processData
protected abstract void processData()Import the data - e.g. read the rows from the data source. The Overriding class does the actual import using arguments, tableWriter, and tableListenerFactory -
finishImport
protected void finishImport()Wrap up the import process. Close the tableWriter and any other finalization tasks. Implementors should not need to override this. -
doImport
protected void doImport()Execute the steps for an import to a specific location. Implementors should not need to override this.
-