Package com.illumon.iris.importers
Class AppendingImportTableWriterFactory
java.lang.Object
com.illumon.iris.importers.AppendingImportTableWriterFactory
- All Implemented Interfaces:
ImportTableWriterFactory
A wrapper for table writer factory that forces append mode after a table is requested the 1st time.
This is useful if the factory is used repeatedly with the same partition(s) and we don't want to wipe out the
table after the 1st run.
-
Constructor Summary
ConstructorsConstructorDescriptionAppendingImportTableWriterFactory
(ImportTableWriterFactory tableWriterFactory) -
Method Summary
Modifier and TypeMethodDescriptionGet the table definition associated with the table that will be written.getTableDestination
(String columnPartitionValue) Get aFile
representing the path where the table will be written.getTableWriter
(String columnPartitionValue, boolean append) Get aTableWriter
for the table and specified partition, optionally appending.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.illumon.iris.importers.ImportTableWriterFactory
getComputedColumnPartition, getTableWriter
-
Constructor Details
-
AppendingImportTableWriterFactory
-
-
Method Details
-
getTableDefinition
Description copied from interface:ImportTableWriterFactory
Get the table definition associated with the table that will be written.- Specified by:
getTableDefinition
in interfaceImportTableWriterFactory
- Returns:
- the table definition.
-
getTableDestination
Description copied from interface:ImportTableWriterFactory
Get aFile
representing the path where the table will be written.- Specified by:
getTableDestination
in interfaceImportTableWriterFactory
- Parameters:
columnPartitionValue
- the column partition to find the destination for- Returns:
- a file at the path the table will be written.
-
getTableWriter
Description copied from interface:ImportTableWriterFactory
Get aTableWriter
for the table and specified partition, optionally appending.- Specified by:
getTableWriter
in interfaceImportTableWriterFactory
- Parameters:
columnPartitionValue
- the column partition to use. Some implementations allow nulls.append
- if the table should be appended or replaced.- Returns:
- an appropriate
TableWriter
-