Package io.deephaven.importers
Class ImportTableWriterFactoryBase
java.lang.Object
io.deephaven.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
FieldsModifier and TypeFieldDescriptionprotected final Stringprotected final ImportOutputModeprotected final io.deephaven.shadow.enterprise.com.illumon.iris.db.tables.TableDefinitionprotected final Stringprotected final io.deephaven.shadow.enterprise.com.illumon.iris.db.tables.TableDefinition -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedImportTableWriterFactoryBase(String dbNamespace, String tableName, ImportOutputMode outputMode, @NotNull io.deephaven.shadow.enterprise.com.illumon.iris.db.tables.TableDefinition tableDefinition) -
Method Summary
Modifier and TypeMethodDescription@NotNull io.deephaven.shadow.enterprise.com.illumon.iris.db.tables.appendable.local.LocalAppendableTablegetLocalAppendableTable(String columnPartitionValue, boolean forceAppend) The method validates the destination against theImportOutputModeincluded for the CsvImport unless forceAppend is true.io.deephaven.shadow.enterprise.com.illumon.iris.db.tables.TableDefinitionNote this returns the full table definition including partitioning columns.protected io.deephaven.shadow.enterprise.com.illumon.iris.binarystore.TableWritergetTableWriter(File destinationDirectory, boolean forceAppend) io.deephaven.shadow.enterprise.com.illumon.iris.binarystore.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 io.deephaven.importers.ImportTableWriterFactory
getComputedColumnPartition, getTableDestination, getTableWriter
-
Field Details
-
namespace
-
tableName
-
tableDefinition
protected final io.deephaven.shadow.enterprise.com.illumon.iris.db.tables.TableDefinition tableDefinition -
writableTableDefinition
protected final io.deephaven.shadow.enterprise.com.illumon.iris.db.tables.TableDefinition writableTableDefinition -
outputMode
-
-
Constructor Details
-
ImportTableWriterFactoryBase
protected ImportTableWriterFactoryBase(String dbNamespace, String tableName, ImportOutputMode outputMode, @NotNull @NotNull io.deephaven.shadow.enterprise.com.illumon.iris.db.tables.TableDefinition tableDefinition)
-
-
Method Details
-
getTableDefinition
public io.deephaven.shadow.enterprise.com.illumon.iris.db.tables.TableDefinition getTableDefinition()Note this returns the full table definition including partitioning columns.- Specified by:
getTableDefinitionin interfaceImportTableWriterFactory- Returns:
- the table definition.
-
getLocalAppendableTable
@NotNull public @NotNull io.deephaven.shadow.enterprise.com.illumon.iris.db.tables.appendable.local.LocalAppendableTable getLocalAppendableTable(String columnPartitionValue, boolean forceAppend) The method validates the destination against theImportOutputModeincluded for the CsvImport unless forceAppend is true. Creates a newLocalAppendableTableinstance to return.- Specified by:
getLocalAppendableTablein interfaceImportTableWriterFactory- Parameters:
columnPartitionValue- the column partition to use. Some implementations allow nulls.forceAppend- when true will useImportOutputMode.APPENDwhen initializing the instance ofLocalAppendableTablebeing returned. A value of false will use theImportOutputModeprovided as part of the import call- Returns:
- A new
LocalAppendableTableusing the destination retrieved using the provided column partition value and resolvedImportOutputMode
-
getTableWriter
public io.deephaven.shadow.enterprise.com.illumon.iris.binarystore.TableWriter getTableWriter(String columnPartitionValue, boolean forceAppend) 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
protected io.deephaven.shadow.enterprise.com.illumon.iris.binarystore.TableWriter getTableWriter(File destinationDirectory, boolean forceAppend)
-