Package com.illumon.iris.db.schema
Class LegacySchemaImporter
java.lang.Object
com.illumon.iris.db.schema.LegacySchemaImporter
One-time (?) bridge to import schema stored on disk into the schema service.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic void
doMigration
(com.fishlib.io.logger.Logger log, SchemaService schemaService, org.apache.commons.cli.CommandLine commandLine) gatherSchemaFiles
(com.fishlib.io.logger.Logger log, com.fishlib.configuration.Configuration configuration, List<String> errorMessages, Collection<String> includeNamespaces, Collection<String> excludeNamespaces, boolean allowErrors, String[] schemaFileNames, SchemaService schemaService, String directory, List<NamespaceSet> namespaceSets, boolean migrateOption, boolean verbose, boolean lenientValidation, boolean compileListeners) Search the (legacy) schema resource locations for schema files.static void
-
Constructor Details
-
LegacySchemaImporter
public LegacySchemaImporter()
-
-
Method Details
-
doMigration
public static void doMigration(@NotNull com.fishlib.io.logger.Logger log, @NotNull SchemaService schemaService, @NotNull org.apache.commons.cli.CommandLine commandLine) -
gatherSchemaFiles
public static Map<String,Map<String, gatherSchemaFilesSchemaXml>> (@NotNull com.fishlib.io.logger.Logger log, @NotNull com.fishlib.configuration.Configuration configuration, @NotNull List<String> errorMessages, @NotNull Collection<String> includeNamespaces, @NotNull Collection<String> excludeNamespaces, boolean allowErrors, @Nullable String[] schemaFileNames, @Nullable SchemaService schemaService, @Nullable String directory, @Nullable List<NamespaceSet> namespaceSets, boolean migrateOption, boolean verbose, boolean lenientValidation, boolean compileListeners) Search the (legacy) schema resource locations for schema files. If locations are specified, only those locations will be used. Otherwise, migration mode must be enabled and the legacy locations are searched for schema files.- Parameters:
log
- for logging warningsconfiguration
- the configuration to useerrorMessages
- any errors found while parsing schema filesincludeNamespaces
- if non-empty, only these namespaces will be processed and all will be included (even if empty)excludeNamespaces
- namespaces in this list will not be processedallowErrors
- if false, any error parsing a schema file will be fatal. If true, valid schemas will be processed even if some schemas have errorsschemaFileNames
- an optional array of schema file names to be imported (this takes priority over legacy schema resolution)schemaService
- an optional schema service that can be used to see if copy table sources already existdirectory
- an optional directory in which to find schema files (this takes priority over schemaFileNames and legacy resource resolution)namespaceSets
- if specified, the namespace sets to addmigrateOption
- if true, schemas will be gathered from legacy resource locations if no directory or files are specifiedverbose
- if true, log full exception textlenientValidation
- if true, ClassNotFoundExceptions will be ignored when validatingcompileListeners
- if true, try to compile listeners- Returns:
- a map of namespace to table to schema
-
main
-