Migrate Atlas Data

The Atlas upgrade requires a data conversion. To complete this conversion, you must export the Atlas metadata to a JSON file and set the location of the exported file in the Atlas properties. When the HDP upgrade starts, Atlas imports the metadata automatically.

In CDP Private Cloud Base, Atlas uses the JanusGraph instead of Titan for data storage and processing. The metadata is converted by being exported from the current version of HDP and imported by the HDP intermediate bits. To complete the data migration, perform the following steps
  1. In the Ambari Web UI, click Atlas, then select Actions > Stop.
  2. Make sure that HBase is running. If it is not, in the Ambari Web UI, click HBase, then select Actions > Start.
  3. SSH to the host where your Atlas Metadata Server is running.
  4. Export Atlas metadata.
    python /usr/hdp/7.1.1.0-<build_number>/atlas/tools/migration-exporter/atlas_migration_export.py -d <output directory>

    For example, this command exports the metadata to an output directory called atlas_metadata.

    python /usr/hdp/7.1.1.0-565/atlas/tools/migration-exporter/atlas_migration_export.py -d ./atlas_metadata
    While running, the Atlas migration tool prevents Atlas use, and blocks all REST APIs and Atlas hook notification processing. The time it takes to export the Atlas metadata depends on the number of entities and your cluster configuration. You can use the following command to display the export status:
    tail -f /var/log/atlas/atlas-migration-exporter.log

    The export creates a file named atlas-migration-data.json in the output directory specified, which contains the exported Atlas entity data.

  5. After the upgrade, configure the HPD 7.1.x.x Atlas with the location of the exported data. Use the following steps to configure the atlas.migration.data.filename property.
    1. In Ambari, select Services > Atlas > Configs > Advanced > Custom application-properties.
    2. Click Add Property, and add the atlas.migration.data.filename property. Set the value to the absolute location of the directory containing your exported Atlas metadata. For example:
    3. Save the configuration.
    4. Click Services > Atlas > Restart > Restart All Affected.
    5. Re-run the Atlas service check by clicking Actions > Run Service Check.
    Restarting Atlas initiates the import of the Atlas metadata into the HDP intermediate bits. During the migration import process, Atlas blocks all REST API calls and Atlas hook notification processing.
After the migration is complete, change Atlas from migration mode to normal operation by removing the atlas.migration.data.filename property that you set in step 5 above.