Create path mappings when you want to define an alternative target path for a specific target filesystem.
Why use path mapping?
If you don't map paths, the source path on your source filesystem is created on your target filesystem. This may not always be suitable for your migration.
The following example shows a common use case where the default Hive metastore warehouse directory for Hortonworks is
/apps/hive/warehouse, and the default for Azure HDInsight is
|Example for Hortonworks to HDInsight
|Without path mapping
|With path mapping
Using path mapping enables any migrated data (relating to managed Hive databases and tables) to be stored in the equivalent default location on the target.
Create a path mapping with the UI
You can create path mappings through the UI. To access path mappings:
- From your Dashboard, select the product under Products.
- Under Migrations, select Path Mappings.
Here, you will see a list of any existing path mappings.
Add a path mapping
To add a path mapping, select Add New Path Mapping.
In the form that appears, enter the following details:
- Name: A reference name for your path mapping.
- Source Filesystem: The filesystem source. Selectable via a drop-down menu.
- Path for <Source_Filesystem_Name>: The directory path on the source filesystem to map from. Appears only after selecting a source filesystem.
- Target Filesystem: The target filesystem to map to in migrations. Selectable via a drop-down menu.
- Path for <Target_Filesystem_Name>: The directory path on the target filesystem to map to. Appears only after selecting a target filesystem.
Select Add once you've entered all necessary information to create your new path mapping. The path mapping is then added to the Path Mappings tab.
Remove a path mapping
To delete a path mapping, locate the path mapping you want to remove in the list and select the trash can icon next to it.
When you delete a path mapping, migrations using the path mapping aren't affected. They continue to function as if the path mapping were still in place.
Create a path mapping with the CLI
Add path mappings
path mapping add command to define your source and target paths, as well as your target filesystem.
Manage path mappings
path mapping delete
|Delete a path mapping
path mapping list
|List all path mappings or list path mappings for a specific filesystem
path mapping show
|Show details of a specified path mapping
Path mapping limitation
Paths on the source filesystem will not be migrated if they conflict with target paths that are created by the path mapping rules.
An example would be if you had a path mapping rule such as below:
In this case, if a new directory is created on the source
/repl/folder/old/newdir, it is migrated to the target as
However, if the following directory is created on the source
/repl/folder/old/archive, this would not be migrated as it conflicts with the path mapping rule.