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

    Constructors
    Constructor
    Description
    PreviewTableImportTableWriterFactory(@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 Type
    Method
    Description
    @Nullable String
    Returns the single partition value passed in the constructor.
    @Nullable String
    getComputedColumnPartition(@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.LocalAppendableTable
    getLocalAppendableTable(String partitionValue, boolean forceAppend)
    Returns the LocalAppendableTable for 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.TableDefinition
    Get the table definition associated with the table that will be written.
    @NotNull File
    getTableDestination(String columnPartitionValue)
    Get a File representing the path where the table will be written.
    io.deephaven.shadow.enterprise.com.illumon.iris.binarystore.TableWriter
    getTableWriter(String columnPartitionValue, boolean forceAppend)
    Get a TableWriter for the table and specified partition, optionally appending.
    Collection<io.deephaven.shadow.enterprise.com.illumon.iris.db.v2.utils.DynamicTableWriter>
    Returns an unmodifiable collection of DynamicTableWriter objects in the order they were created.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods 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 imported
      tableDefinition - The legacy table definition
      internalPartitionValue - The internal partition used in creating location key for each partition
      columnPartitionValue - 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: ImportTableWriterFactory
      Get the table definition associated with the table that will be written.
      Specified by:
      getTableDefinition in interface ImportTableWriterFactory
      Returns:
      the table definition.
    • getTableDestination

      @NotNull public @NotNull File getTableDestination(String columnPartitionValue)
      Description copied from interface: ImportTableWriterFactory
      Get a File representing the path where the table will be written.
      Specified by:
      getTableDestination in interface ImportTableWriterFactory
      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: ImportTableWriterFactory
      Returns the LocalAppendableTable for given column partition value.
      Specified by:
      getLocalAppendableTable in interface ImportTableWriterFactory
      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 LocalAppendableTable for column partition value.
    • getTableWriter

      public io.deephaven.shadow.enterprise.com.illumon.iris.binarystore.TableWriter getTableWriter(String columnPartitionValue, boolean forceAppend)
      Description copied from interface: ImportTableWriterFactory
      Get a TableWriter for the table and specified partition, optionally appending.
      Specified by:
      getTableWriter in interface ImportTableWriterFactory
      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: 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 return null indicating that there is no valid column partition.
      Specified by:
      getComputedColumnPartition in interface ImportTableWriterFactory
      Parameters:
      inputColumnPartition - the requested input partition
      Returns:
      the computed column partition
    • getColumnPartitionValue

      @Nullable public @Nullable String 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 of DynamicTableWriter objects in the order they were created.
      Returns:
      DynamicTableWriter Collection of table writers in the order they were created
    • getPartitionValuesSet

      public Set<String> 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