Package com.illumon.iris.importers
Class SinglePartitionImportTableFactory
java.lang.Object
com.illumon.iris.importers.ImportTableWriterFactoryBase
com.illumon.iris.importers.SinglePartitionImportTableFactory
- All Implemented Interfaces:
ImportTableWriterFactory
This should be used when a non-null single partition value should be used for import.
The factory will always return this single partition in the getComputedColumnPartition(String)
call.
This also means the getTableDestination(String)
returns the same destination
-
Field Summary
Fields inherited from class com.illumon.iris.importers.ImportTableWriterFactoryBase
namespace, outputMode, tableDefinition, tableName, writableTableDefinition
-
Constructor Summary
ConstructorsConstructorDescriptionSinglePartitionImportTableFactory
(String namespace, String tableName, ImportOutputMode outputMode, TableDefinition tableDefinition, String internalPartition, String columnPartition) Constructor. -
Method Summary
Modifier and TypeMethodDescriptiongetComputedColumnPartition
(String inputColumnPartition) The method is invoked to determine the partition value to which the current row of data needs to be associated.getTableDestination
(String columnPartitionValue) Get aFile
representing the path where the table will be written.Methods inherited from class com.illumon.iris.importers.ImportTableWriterFactoryBase
getTableDefinition, getTableWriter, getTableWriter
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
getTableWriter
-
Constructor Details
-
SinglePartitionImportTableFactory
public SinglePartitionImportTableFactory(@NotNull String namespace, @NotNull String tableName, @NotNull ImportOutputMode outputMode, @NotNull TableDefinition tableDefinition, @NotNull String internalPartition, @NotNull String columnPartition) Constructor.- Parameters:
namespace
- The schema namespacetableName
- The schema tablenameoutputMode
- The selected mode (one of safe, append, replace)tableDefinition
- The schema table definitioninternalPartition
- Non-null internal partition that is needed to build theFullTableLocationKey
columnPartition
- Non-null column partition used to build theFullTableLocationKey
-
-
Method Details
-
getTableDestination
Description copied from interface:ImportTableWriterFactory
Get aFile
representing the path where the table will be written.- Parameters:
columnPartitionValue
- the column partition to find the destination for- Returns:
- a file at the path the table will be written.
-
getComputedColumnPartition
Description copied from interface:ImportTableWriterFactory
The method is invoked to determine the partition value to which the current row of data needs to be associated. So in the case where user wants a single partition value for the import this should return that value. In other cases this may simply return the passed in value, however, it is possible to returnnull
indicating that there is no valid column partition.- Parameters:
inputColumnPartition
- the requested input partition- Returns:
- the computed column partition
-