Package com.illumon.iris.importers
Class ImportTableWriterFactoryBase
java.lang.Object
com.illumon.iris.importers.ImportTableWriterFactoryBase
- All Implemented Interfaces:
ImportTableWriterFactory
- Direct Known Subclasses:
DirectoryImportTableFactory,MultiPartitionImportTableWriterFactory,SinglePartitionImportTableFactory
public abstract class ImportTableWriterFactoryBase extends Object implements ImportTableWriterFactory
A base for table writer factories with common utility code to validate and prepare table destination directories,
and create the table writers.
-
Field Summary
Fields Modifier and Type Field Description protected Stringnamespaceprotected ImportOutputModeoutputModeprotected TableDefinitiontableDefinitionprotected StringtableNameprotected TableDefinitionwritableTableDefinition -
Method Summary
Modifier and Type Method Description TableDefinitiongetTableDefinition()Note this returns the full table definition including partitioning columns.protected TableWritergetTableWriter(File destinationDirectory, boolean forceAppend)TableWritergetTableWriter(String columnPartitionValue, boolean forceAppend)Get aTableWriterfor the table and specified partition, optionally appending.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.illumon.iris.importers.ImportTableWriterFactory
getComputedColumnPartition, getTableDestination, getTableWriter
-
Field Details
-
Method Details
-
getTableDefinition
Note this returns the full table definition including partitioning columns.- Specified by:
getTableDefinitionin interfaceImportTableWriterFactory- Returns:
- the table definition.
-
getTableWriter
Description copied from interface:ImportTableWriterFactoryGet aTableWriterfor the table and specified partition, optionally appending.- Specified by:
getTableWriterin interfaceImportTableWriterFactory- Parameters:
columnPartitionValue- the column partition to use. Some implementations allow nulls.forceAppend- if the table should be appended or replaced.- Returns:
- an appropriate
TableWriter
-
getTableWriter
-