Interface ImportTableWriterFactory

All Known Implementing Classes:
DirectoryImportTableFactory, ImportTableWriterFactoryBase, MultiPartitionImportTableWriterFactory, PreviewTableImportTableWriterFactory, SinglePartitionImportTableFactory

public interface ImportTableWriterFactory
A Factory to generate TableWriters for use with various importers.
  • Method Summary

    Modifier and Type
    Method
    Description
    default @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 columnPartitionValue, boolean forceAppend)
    Returns the LocalAppendableTable for given column partition value.
    io.deephaven.shadow.enterprise.com.illumon.iris.db.tables.TableDefinition
    Get the table definition associated with the table that will be written.
    @Nullable File
    getTableDestination(String columnPartitionValue)
    Get a File representing the path where the table will be written.
    default @Nullable io.deephaven.shadow.enterprise.com.illumon.iris.binarystore.TableWriter
    getTableWriter(String columnPartitionValue)
    Get a TableWriter that will replace the specified column partition.
    @Nullable io.deephaven.shadow.enterprise.com.illumon.iris.binarystore.TableWriter
    getTableWriter(String columnPartitionValue, boolean append)
    Get a TableWriter for the table and specified partition, optionally appending.
  • Method Details

    • getTableDefinition

      io.deephaven.shadow.enterprise.com.illumon.iris.db.tables.TableDefinition getTableDefinition()
      Get the table definition associated with the table that will be written.
      Returns:
      the table definition.
    • getTableWriter

      @Nullable @Nullable io.deephaven.shadow.enterprise.com.illumon.iris.binarystore.TableWriter getTableWriter(String columnPartitionValue, boolean append)
      Get a TableWriter for the table and specified partition, optionally appending.
      Parameters:
      columnPartitionValue - the column partition to use. Some implementations allow nulls.
      append - if the table should be appended or replaced.
      Returns:
      an appropriate TableWriter
    • getTableDestination

      @Nullable @Nullable File getTableDestination(String columnPartitionValue)
      Get a File 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.
    • getLocalAppendableTable

      @NotNull @NotNull io.deephaven.shadow.enterprise.com.illumon.iris.db.tables.appendable.local.LocalAppendableTable getLocalAppendableTable(String columnPartitionValue, boolean forceAppend)
      Returns the LocalAppendableTable for given column partition value.
      Parameters:
      columnPartitionValue - 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

      @Nullable default @Nullable io.deephaven.shadow.enterprise.com.illumon.iris.binarystore.TableWriter getTableWriter(String columnPartitionValue)
      Get a TableWriter that will replace the specified column partition. This is the same as calling getTableWriter(String, boolean) with false.
      Parameters:
      columnPartitionValue - the column partition
      Returns:
      an appropriate TableWriter
    • getComputedColumnPartition

      @Nullable default @Nullable String getComputedColumnPartition(@Nullable @Nullable String inputColumnPartition)
      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.
      Parameters:
      inputColumnPartition - the requested input partition
      Returns:
      the computed column partition