Class LocalAppendableTableTools
public class LocalAppendableTableTools extends Object
-
Constructor Summary
Constructors Constructor Description LocalAppendableTableTools()
-
Method Summary
Modifier and Type Method Description static void
generateMissingCheckpointRecord(TableDefinition tableDefinition, WritableLocalTableLocation tableLocation)
Attempt to generate a table location checkpoint record for the supplied definition and location.static boolean
upgradeCheckpointRecord(TableDefinition tableDefinition, WritableLocalTableLocation tableLocation)
Attempt to upgrade a table location checkpoint record for the supplied definition and location by filling in empty fields.
-
Constructor Details
-
LocalAppendableTableTools
public LocalAppendableTableTools()
-
-
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 columnstableLocation
- 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 columnstableLocation
- The table location- Returns:
- true if the checkpoint record was changed
-