Class LocalAppendableTableTools

java.lang.Object
com.illumon.iris.db.tables.appendable.local.LocalAppendableTableTools

public class LocalAppendableTableTools
extends Object
Helper class for tools related to local appendable tables.
  • Constructor Details

  • Method Details

    • generateMissingCheckpointRecord

      public static void generateMissingCheckpointRecord​(@NotNull TableDefinition tableDefinition, @NotNull WritableLocalTableLocation tableLocation)

      Attempt to generate a table location checkpoint record for the supplied definition and location.

      Assumes that the location's writer checkpoint record has been found to be missing or cleared, and that existing data is fully consistent.

      This is mostly useful for legacy table location formats used prior to the advent of support for dynamically-updating data. It's not expected that any table location written since 2012 will be missing metadata altogether.

      Parameters:
      tableDefinition - The table definition expected for the location's columns
      tableLocation - The table location
    • upgradeCheckpointRecord

      public static boolean upgradeCheckpointRecord​(@NotNull TableDefinition tableDefinition, @NotNull WritableLocalTableLocation tableLocation)

      Attempt to upgrade a table location checkpoint record for the supplied definition and location by filling in empty fields.

      Assumes that the location's writer checkpoint record has been filled from persistent storage, and that existing data is fully consistent.

      This is mostly useful for appending to table locations written with prior checkpoint record versions.

      Parameters:
      tableDefinition - The table definition expected for the location's columns
      tableLocation - The table location
      Returns:
      true if the checkpoint record was changed