Package io.deephaven.importers
Class PreviewTableImportTableWriterFactory
java.lang.Object
io.deephaven.importers.PreviewTableImportTableWriterFactory
- All Implemented Interfaces:
ImportTableWriterFactory
public class PreviewTableImportTableWriterFactory
extends Object
implements ImportTableWriterFactory
ImportTableWriterFactory implementation used in Preview Import Table functionality.-
Constructor Summary
ConstructorsConstructorDescriptionPreviewTableImportTableWriterFactory(@NotNull Schema schema, @NotNull io.deephaven.shadow.enterprise.com.illumon.iris.db.tables.TableDefinition tableDefinition, @NotNull String internalPartitionValue, @Nullable String columnPartitionValue) Constructor. -
Method Summary
Modifier and TypeMethodDescription@Nullable StringReturns the single partition value passed in the constructor.@Nullable StringgetComputedColumnPartition(@Nullable String inputColumnPartition) The method is invoked to determine the partition value to which the current row of data needs to be associated.@NotNull io.deephaven.shadow.enterprise.com.illumon.iris.db.tables.appendable.local.LocalAppendableTablegetLocalAppendableTable(String partitionValue, boolean forceAppend) Returns theLocalAppendableTablefor given column partition value.Returns an unmodifiable ordered set of partition values used to create the table destinations in the import.io.deephaven.shadow.enterprise.com.illumon.iris.db.tables.TableDefinitionGet the table definition associated with the table that will be written.@NotNull FilegetTableDestination(String columnPartitionValue) Get aFilerepresenting the path where the table will be written.io.deephaven.shadow.enterprise.com.illumon.iris.binarystore.TableWritergetTableWriter(String columnPartitionValue, boolean forceAppend) Get aTableWriterfor the table and specified partition, optionally appending.Collection<io.deephaven.shadow.enterprise.com.illumon.iris.db.v2.utils.DynamicTableWriter>Returns an unmodifiable collection ofDynamicTableWriterobjects in the order they were created.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
getTableWriter
-
Constructor Details
-
PreviewTableImportTableWriterFactory
public PreviewTableImportTableWriterFactory(@NotNull @NotNull Schema schema, @NotNull @NotNull io.deephaven.shadow.enterprise.com.illumon.iris.db.tables.TableDefinition tableDefinition, @NotNull @NotNull String internalPartitionValue, @Nullable @Nullable String columnPartitionValue) Constructor.- Parameters:
schema- The schema definition of the table being importedtableDefinition- The legacy table definitioninternalPartitionValue- The internal partition used in creating location key for each partitioncolumnPartitionValue- Optional partition value to use, should be not null in case of Single Partition value imports
-
-
Method Details
-
getTableDefinition
public io.deephaven.shadow.enterprise.com.illumon.iris.db.tables.TableDefinition getTableDefinition()Description copied from interface:ImportTableWriterFactoryGet the table definition associated with the table that will be written.- Specified by:
getTableDefinitionin interfaceImportTableWriterFactory- Returns:
- the table definition.
-
getTableDestination
Description copied from interface:ImportTableWriterFactoryGet aFilerepresenting the path where the table will be written.- Specified by:
getTableDestinationin interfaceImportTableWriterFactory- Parameters:
columnPartitionValue- the column partition to find the destination for- Returns:
- a file at the path the table will be written.
-
getLocalAppendableTable
@NotNull public @NotNull io.deephaven.shadow.enterprise.com.illumon.iris.db.tables.appendable.local.LocalAppendableTable getLocalAppendableTable(String partitionValue, boolean forceAppend) Description copied from interface:ImportTableWriterFactoryReturns theLocalAppendableTablefor given column partition value.- Specified by:
getLocalAppendableTablein interfaceImportTableWriterFactory- Parameters:
partitionValue- 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.
-
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
-
getComputedColumnPartition
@Nullable public @Nullable String getComputedColumnPartition(@Nullable @Nullable String inputColumnPartition) Description copied from interface:ImportTableWriterFactoryThe 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 returnnullindicating that there is no valid column partition.- Specified by:
getComputedColumnPartitionin interfaceImportTableWriterFactory- Parameters:
inputColumnPartition- the requested input partition- Returns:
- the computed column partition
-
getColumnPartitionValue
Returns the single partition value passed in the constructor. A non-null value indicates that the import was done using a single partition value.- Returns:
- the partition value passed in constructor
-
getWriters
public Collection<io.deephaven.shadow.enterprise.com.illumon.iris.db.v2.utils.DynamicTableWriter> getWriters()Returns an unmodifiable collection ofDynamicTableWriterobjects in the order they were created.- Returns:
DynamicTableWriterCollection of table writers in the order they were created
-
getPartitionValuesSet
Returns an unmodifiable ordered set of partition values used to create the table destinations in the import.- Returns:
- an instance of ordered set of partition values
-