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 SummaryConstructorsConstructorDescriptionAppendingImportTableWriterFactory(ImportTableWriterFactory tableWriterFactory) 
- 
Method SummaryModifier and TypeMethodDescriptiongetLocalAppendableTable(String columnPartitionValue, boolean forceAppend) Returns theLocalAppendableTablefor given column partition value.Get the table definition associated with the table that will be written.getTableDestination(String columnPartitionValue) Get aFilerepresenting the path where the table will be written.getTableWriter(String columnPartitionValue, boolean append) Get aTableWriterfor the table and specified partition, optionally appending.Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.illumon.iris.importers.ImportTableWriterFactorygetComputedColumnPartition, getTableWriter
- 
Constructor Details- 
AppendingImportTableWriterFactory
 
- 
- 
Method Details- 
getTableDefinitionDescription copied from interface:ImportTableWriterFactoryGet the table definition associated with the table that will be written.- Specified by:
- getTableDefinitionin interface- ImportTableWriterFactory
- Returns:
- the table definition.
 
- 
getTableDestinationDescription copied from interface:ImportTableWriterFactoryGet aFilerepresenting the path where the table will be written.- Specified by:
- getTableDestinationin interface- ImportTableWriterFactory
- Parameters:
- columnPartitionValue- the column partition to find the destination for
- Returns:
- a file at the path the table will be written.
 
- 
getLocalAppendableTable@NotNull public LocalAppendableTable getLocalAppendableTable(String columnPartitionValue, boolean forceAppend) Description copied from interface:ImportTableWriterFactoryReturns theLocalAppendableTablefor given column partition value.- Specified by:
- getLocalAppendableTablein interface- ImportTableWriterFactory
- Parameters:
- columnPartitionValue- the column partition to use. Some implementations allow nulls.
- forceAppend- When true, the LocalAppendableTable will be initialized to append to any existing data. When false, append/replace/fail behavior is implementation defined.
- Returns:
- Returned appropriate LocalAppendableTablefor column partition value.
 
- 
getTableWriterDescription copied from interface:ImportTableWriterFactoryGet aTableWriterfor the table and specified partition, optionally appending.- Specified by:
- getTableWriterin interface- ImportTableWriterFactory
- Parameters:
- columnPartitionValue- the column partition to use. Some implementations allow nulls.
- append- if the table should be appended or replaced.
- Returns:
- an appropriate TableWriter
 
 
-