Class ImportStateDetails

java.lang.Object
io.deephaven.enterprise.ingester.impl.ImportStateDetails

public class ImportStateDetails extends Object
An import state details provides the class, constructor arguments, and key columns for an ImportState.

The KafkaTableWriter presently supports only TupleKeyedAbstractImportStates, which we can automatically extract values from our table to call the new row method without code generation.

When multiple import states are specified, then the infrastructure automatically creates a CompositeImportState for each of the specified states.

Note: This class is not part of the public Deephaven Core+ API.

  • Constructor Details

    • ImportStateDetails

      public ImportStateDetails(Class<? extends io.deephaven.shadow.enterprise.com.illumon.iris.db.tables.dataimport.importstate.TupleKeyedAbstractImportState> importStateClass, List<String> importStateKeyColumns)
    • ImportStateDetails

      public ImportStateDetails(@NotNull @NotNull Class<? extends io.deephaven.shadow.enterprise.com.illumon.iris.db.tables.dataimport.importstate.TupleKeyedAbstractImportState> importStateClass, @NotNull @NotNull List<String> importStateKeyColumns, @NotNull @NotNull Class<?>[] constructorTypes, @NotNull @NotNull Object[] constructorArguments)
  • Method Details

    • getImportStateClass

      public Class<? extends io.deephaven.shadow.enterprise.com.illumon.iris.db.tables.dataimport.importstate.TupleKeyedAbstractImportState> getImportStateClass()
    • getImportStateKeyColumns

      public List<String> getImportStateKeyColumns()
    • getConstructorTypes

      public Class<?>[] getConstructorTypes()
    • getConstructorArguments

      public Object[] getConstructorArguments()
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • importStateKeyColumns

      public List<String> importStateKeyColumns()
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • checkColumnsForImportStates

      public static void checkColumnsForImportStates(@NotNull @NotNull Set<String> targetColumnNames, @NotNull @NotNull List<ImportStateDetails> importStateDetails)
      Verify that all columns required by the list of importStateDetails are present in targetColumnNames
      Parameters:
      targetColumnNames - the column names in the target table
      importStateDetails - the import state details for the given table
    • computeImportStateKeyColumnIndices

      public static int[][] computeImportStateKeyColumnIndices(List<ImportStateDetails> importStateDetails, List<String> columnNames)
      Compute the indices of column names referenced by the import state details, or null if there are no import state details.
      Parameters:
      importStateDetails - the list of import state details
      columnNames - the names of the columns in our table (in order)
      Returns:
      the index of columns used by each of the import state details