Package com.illumon.iris.importers.util
Class ImportBuilder<BUILDER_TYPE extends ImportBuilder<BUILDER_TYPE,IMPORT_TYPE>,IMPORT_TYPE extends ImportBase>
java.lang.Object
com.illumon.iris.importers.util.ImportBuilder<BUILDER_TYPE,IMPORT_TYPE>
- Type Parameters:
BUILDER_TYPE- The type of builder returnedIMPORT_TYPE- the Importer type
- Direct Known Subclasses:
DownsampleImport.Builder,FileImportBuilder,JdbcImport.Builder
public abstract class ImportBuilder<BUILDER_TYPE extends ImportBuilder<BUILDER_TYPE,IMPORT_TYPE>,IMPORT_TYPE extends ImportBase> extends Object
Base class for ImportBuilders with properties common to all imports.
-
Field Summary
Fields Modifier and Type Field Description protected FiledestinationDirectoryprotected StringdestinationPartitionsprotected Stringnamespaceprotected ImportOutputModeoutputModeprotected StringpartitionColumnprotected SchemaServiceschemaServiceprotected StringsourceNameprotected booleanstrictprotected Stringtable -
Method Summary
Modifier and Type Method Description abstract IMPORT_TYPEbuild()Builds the importer.protected abstract BUILDER_TYPEgetThis()Returns this builder.BUILDER_TYPEsetDestinationDirectory(File destinationDirectory)Sets the destination directory.BUILDER_TYPEsetDestinationPartitions(String destinationPartitions)Sets the destination partitionsBUILDER_TYPEsetDestinationPartitions(String[] destinationPartitions)Sets the destination partitionsBUILDER_TYPEsetOutputMode(ImportOutputMode outputMode)Sets the output mode.BUILDER_TYPEsetOutputMode(String outputMode)Sets the output mode.BUILDER_TYPEsetPartitionColumn(String partitionColumn)Sets the partition column.BUILDER_TYPEsetSchemaService(SchemaService schemaService)Sets the schema service.BUILDER_TYPEsetSourceName(String sourceName)Sets the source name.BUILDER_TYPEsetStrict(boolean strict)Sets strict checking.
-
Field Details
-
namespace
-
table
-
destinationPartitions
-
destinationDirectory
-
outputMode
-
strict
protected boolean strict -
partitionColumn
-
sourceName
-
schemaService
-
-
Method Details
-
setDestinationPartitions
Sets the destination partitions- Parameters:
destinationPartitions- destination partitions.- Returns:
- this builder.
-
setDestinationPartitions
Sets the destination partitions- Parameters:
destinationPartitions- destination partitions.- Returns:
- this builder.
-
setDestinationDirectory
Sets the destination directory.- Parameters:
destinationDirectory- destination directory.- Returns:
- this builder.
-
setOutputMode
Sets the output mode.- Parameters:
outputMode- output mode.- Returns:
- this builder.
-
setOutputMode
Sets the output mode.- Parameters:
outputMode- output mode.- Returns:
- this builder.
-
setStrict
Sets strict checking.- Parameters:
strict- strict.- Returns:
- this builder.
-
setPartitionColumn
Sets the partition column.- Parameters:
partitionColumn- partition column.- Returns:
- this builder.
-
setSourceName
Sets the source name.- Parameters:
sourceName- source name.- Returns:
- this builder.
-
setSchemaService
Sets the schema service.- Parameters:
schemaService- schema service.- Returns:
- this builder.
-
getThis
Returns this builder. Concrete subclasses mus provide "this" so that the setters can chain properly.- Returns:
- this builder.
-
build
Builds the importer.- Returns:
- importer.
-