@InterfaceAudience.Private public final class StoreFileTrackerValidationUtils extends Object
| Modifier | Constructor and Description |
|---|---|
private |
StoreFileTrackerValidationUtils() |
| Modifier and Type | Method and Description |
|---|---|
static void |
checkForCreateTable(org.apache.hadoop.conf.Configuration conf,
TableDescriptor table)
Pre check when creating a new table.
|
static void |
checkForModifyTable(org.apache.hadoop.conf.Configuration conf,
TableDescriptor oldTable,
TableDescriptor newTable,
boolean isTableDisabled)
Pre check when modifying a table.
|
private static void |
checkForNewFamily(org.apache.hadoop.conf.Configuration conf,
TableDescriptor table,
ColumnFamilyDescriptor family) |
static void |
validatePreRestoreSnapshot(TableDescriptor currentTableDesc,
TableDescriptor snapshotTableDesc,
org.apache.hadoop.conf.Configuration baseConf)
Makes sure restoring a snapshot does not break the current SFT setup follows
StoreUtils.createStoreConfiguration
|
private StoreFileTrackerValidationUtils()
private static void checkForNewFamily(org.apache.hadoop.conf.Configuration conf, TableDescriptor table, ColumnFamilyDescriptor family) throws IOException
IOExceptionpublic static void checkForCreateTable(org.apache.hadoop.conf.Configuration conf, TableDescriptor table) throws IOException
StoreFileTrackerFactory.Trackers.MIGRATION for newly created tables.IOException - when there are check errors, the upper layer should fail the
CreateTableProcedure.public static void checkForModifyTable(org.apache.hadoop.conf.Configuration conf, TableDescriptor oldTable, TableDescriptor newTable, boolean isTableDisabled) throws IOException
StoreFileTrackerFactory.Trackers.MIGRATION first and then change to the destination store file tracker
implementation.
There are several rules:
StoreFileTrackerFactory.Trackers.MIGRATION.StoreFileTrackerFactory.Trackers.MIGRATION, then:
StoreFileTrackerFactory.Trackers.MIGRATION, then they must have the same src and
dst tracker.StoreFileTrackerFactory.Trackers.MIGRATION, then the new tracker must be the dst
tracker of the old tracker.StoreFileTrackerFactory.Trackers.MIGRATION, then:
StoreFileTrackerFactory.Trackers.MIGRATION, then the old tracker must be the src
tracker of the new tracker.StoreFileTrackerFactory.Trackers.MIGRATION, then the new tracker must be the same
with old tracker.IOException - when there are check errors, the upper layer should fail the
ModifyTableProcedure.public static void validatePreRestoreSnapshot(TableDescriptor currentTableDesc, TableDescriptor snapshotTableDesc, org.apache.hadoop.conf.Configuration baseConf) throws RestoreSnapshotException
currentTableDesc - Existing Table's TableDescriptorsnapshotTableDesc - Snapshot's TableDescriptorbaseConf - Current global configurationRestoreSnapshotException - if restore would break the current SFT setupCopyright © 2007–2020 The Apache Software Foundation. All rights reserved.