Package com.illumon.iris.importers
Class GeneralBinaryStoreImporter
java.lang.Object
com.illumon.iris.importers.GeneralBinaryStoreImporter
public class GeneralBinaryStoreImporter extends Object
Binary store importer that can be used in both persistent queries and command-line imports.
-
Constructor Summary
Constructors Constructor Description GeneralBinaryStoreImporter(com.fishlib.io.logger.Logger log, File[] sourceFiles, TableListenerFactory tableListenerFactory, TableWriter tableWriter)
Create the importer instance. -
Method Summary
Modifier and Type Method Description void
finishImport()
Finish the import.static File[]
generateSourceFiles(String sourceFile, String sourceGlob, File sourceDirectory)
Helper method to generate the File array.void
run()
Run the importer, processing all the specified files
-
Constructor Details
-
GeneralBinaryStoreImporter
public GeneralBinaryStoreImporter(@NotNull com.fishlib.io.logger.Logger log, @NotNull File[] sourceFiles, @NotNull TableListenerFactory tableListenerFactory, @NotNull TableWriter tableWriter)Create the importer instance.- Parameters:
log
- Logger used to log messagessourceFiles
- the File array of files to be processedtableListenerFactory
- the TableListenerFactorytableWriter
- the TableWriter
-
-
Method Details
-
generateSourceFiles
public static File[] generateSourceFiles(@Nullable String sourceFile, @Nullable String sourceGlob, @NotNull File sourceDirectory) throws IOExceptionHelper method to generate the File array. Either a source file or a source glob must be provided, but not both.- Parameters:
sourceFile
- source file to processsourceGlob
- source glob used to find source filessourceDirectory
- source directory- Returns:
- a File array containing the list of files to process
- Throws:
IOException
- if an error occurs finding the files
-
run
public void run()Run the importer, processing all the specified files -
finishImport
public void finishImport()Finish the import.
-