Create path mappings
Create path mappings when you want to define a alternative target path for a specific target filesystem.
#
Why use path mapping?When path mapping is not used, the source path on your source filesystem will be created on your target filesystem. This may not always be suitable for the purposes of 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 /hive/warehouse
.
Example for Hortonworks to HDInsight | Source path | Target path |
---|---|---|
Without path mapping | /apps/hive/warehouse | /apps/hive/warehouse |
With path mapping | /apps/hive/warehouse | /hive/warehouse |
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 UIYou can create path mappings through the UI. To access path mappings:
- Click on your intended LiveData Migrator instance under your "Products" list in the dashboard.
- Under the Migrations menu, select Path Mappings.
Here, you will see a list of any existing path mappings.
#
Add a path mappingTo add a path mapping, click the "Add New Path" button in the top right of the interface.
In the form that appears, provide the following details:
- Name: A reference name for your path mapping.
- Source Filesystem: The file system source. Selectable via a drop-down menu.
- Path for <Source_Filesystem_Name>: The directory path on the source file system to map from. Appears only after selecting a source filesystem.
- Target Filesystem: The target file system to map to in migrations. Selectable via a drop-down menu.
- Path for <Target_Filesystem_Name>: The directory path on the target file system to map to. Appears only after selecting a target filesystem.
Click "Add" once you've provided all necessary information to create your new path mapping. It will be listed in the path mappings tab.
#
Remove a path mappingTo delete a path mapping, locate the path mapping you want to remove in the list and click the delete icon to the right of it, depicted by a trash can.
note
When a path mapping is deleted, any migrations using the path mapping will not be affected. They will continue to function as if the path mapping were still in place.
#
Create a path mapping with the CLI#
Add path mappingsUse the path mapping add
command to define your source and target paths, as well as your target filesystem.
#
Manage path mappingsCommand | Action |
---|---|
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 limitationPaths 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:
Source path | Target path |
---|---|
/repl/folder/old | /repl/folder/old/archive |
In this case, if a new directory is created on the source /repl/folder/old/newdir
, it is migrated to the target as /repl/folder/old/archive/newdir
.
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.
#
Next StepsOnce you have defined any path mappings and exclusions, you're ready to migrate data.