hms-mirror v2.3.1.x Help

Index of Settings

Copy Avro Schema Urls

-asm,--avro-schema-migration Migrate AVRO Schema Files referenced in TBLPROPERTIES by 'avro.schema.url'. Without migration it is expected that the file will exist on the other cluster and match the 'url' defined in the schema DDL. If it's not present, schema creation will FAIL. Specifying this option REQUIRES the LEFT and RIGHT cluster to be LINKED. See docs: https://github.com/cloudera-labs/hms-mirror#linking-clusters-storage-layers

attrib_misc.png

copyAvroSchemaUrls is a boolean value that determines if the Avro schema URLs should be copied from the source to the target. This is useful if you're using Avro schemas in your source and target environments and want to maintain the same schema URLs in both environments. The default value is false.

copyAvroSchemaUrls: true|false

Data Strategy

Data Strategy controls how schemas and data are migrated. The following values are supported:

  • SCHEMA_ONLY

  • SQL

  • EXPORT_IMPORT

  • HYBRID

  • DUMP

  • STORAGE_MIGRATION

  • COMMON

  • LINKED

-d|--data-strategy <strategy> 'strategy' is one of the strategies listed above.

The Web UI approaches this setting a little differently. When you 'initialized' a migration session, you'll be asked to select a 'Data Strategy' from a drop-down list. Saved sessions will have the 'data-strategy' embedded in them and is NOT editable. You 'can' create a new session based on an existing session and maintain most of the properties of the original session.

init_data-strategy.png
dataStrategy: "SCHEMA_ONLY|SQL|EXPORT_IMPORT|HYBRID|DUMP|STORAGE_MIGRATION|COMMON|LINKED"

Database Only

When set we'll only migrate the database objects and not the tables.

-dbo|--database-only will only migrate the database objects and not the tables.

attrib_misc.png
databaseOnly: true|false

Dump Test Data

Dumping test data uses the running configuration to create a processable artifact that can be used for testing offline.

dtd|--dump-test-data will dump an artifact that can be used for testing offline.

Not an option in the Web UI.

dumpTestData: true|false

Load Test Data File

Run the process with a test data file that was created with the --dump-test-data option.

-ltd|--load-test-data will load the test data file that was created with the --dump-test-data option.

Not an option in the Web UI.

loadTestDataFile: "<path_to_test_data_file>"

When there are issues connecting to the source or target cluster storage systems, you can skip the link check.
Doing so may mean that certain features will not work as expected. EG: Limits used to determine processing that need to review the storage layer or the ability to copy Avro schema files or optimizations made based on file

-slc|--skip-link-check will skip the link check.

attrib_misc.png

Default is false.

skipLinkCheck: true|false

Database Prefix

dbPrefix is a value to pre-pend to the database name when creating the database in the target cluster. This is way to avoid conflicts with existing databases in the target cluster. The default value is an empty string.

dbPrefix: "<prefix>"

Database Rename

dbRename is a string value that identifies the new name of the database in the target cluster. This is useful for testing a single database migration to an alternate database in the target cluster. This is only valid for a single database migration.

dbRename: "<new_db_name>"

Execute

execute is a boolean value that determines if the migration should be executed. The default value is false, which is the dry-run mode. In the 'dry-run' mode, all the reports are generated and none of the actual migration is done.

execute: true|false

Output Directory

Output directory is a string value that identifies the directory where the reports will be written. The default is $HOME/.hms-mirror/reports. When this value is defined, the reports will be written to the specified output directory with the timestamp as the 'name' of the report.

-o|--output-dir <path_to_output_directory> will set the output directory.

Not available in the Web UI.

outputDirectory: "<path_to_output_directory>"

Encrypted Passwords

encryptedPasswords is a boolean value that determines if the passwords in the configuration file are encrypted.

encryptedPasswords: true|false

Read-Only

Read-Only is a boolean value that determines if the migration should be read-only. The default value is false.
When this value is set to true, table schema's created will not have a 'purge' flag set to ensure they can't drop data. This is useful for testing migrations and for DR scenarios where you want to limit the exposure of potential changes on the target cluster.

-ro|--read-only will set the migration to read-only.

readOnly: true|false

Save Working Tables

saveWorkingTables is a boolean value that determines if the working tables should be saved. The default value is false.

-swt|--save-working-tables

save-working-tables.png
saveWorkingTables: true|false

Skip Features

Skip Features is a boolean value that is false by default so feature check will be made. Features are a framework of checks that examine a table definition and make corrections to it to ensure it's compatible with the target cluster. We've found several circumstances where definitions extracted from the source cluster can NOT be replayed on the target cluster for some reason. These features attempt to correct those issues during the migration.

-sf|--skip-features will skip the feature checks.

skipFeatures: true|false

Transfer Ownership

You can choose to transfer ownership of objects from the source to target clusters. Ownership is defined as the owner of the database or table in the metastore. This is useful if you are using Ranger policies that rely on the owner of the object.

-to|--transfer-ownership will transfer ownership of databases and tables from the source to the target cluster.

-todb|--transfer-ownership-database will transfer ownership of databases from the source to the target cluster.

-totbl|--transfer-ownership-table will transfer ownership of tables from the source to the target cluster.

attrib_misc.png
ownershipTransfer: database: true|false table: true|false
Last modified: 14 April 2025