This topic describes how to migrate data from a semi-managed JindoFS cluster to the OSS-HDFS service.
Prerequisites
-
The OSS-HDFS service is enabled for the OSS bucket that is associated with the semi-managed JindoFS cluster.
-
Audit logging is enabled for the semi-managed JindoFS cluster.
-
Use the latest version of JindoSDK. For the download link, see GitHub.
Step 1: Full migration
In full migration mode, you can migrate all metadata from a directory in a semi-managed JindoFS cluster to a first-level subdirectory in the OSS-HDFS service in a single operation.
-
Command format
jindo distjob -migrateImport -srcPath <srcPath> -destPath <destPath> -backendLoc <backendLoc>Parameters:
Parameter
Description
-srcPath
The source path in the semi-managed JindoFS cluster.
-destPath
The destination path in the OSS-HDFS service.
-backendLoc
The OSS path that corresponds to the source data blocks of the semi-managed JindoFS cluster.
-
Example
Perform a full migration of the jfs://mycluster/foo directory from a semi-managed JindoFS cluster to the bar directory in the OSS-HDFS service. The bucket for the OSS-HDFS service is named examplebucket.
jindo distjob -migrateImport -srcPath jfs://mycluster/foo -destPath oss://examplebucket/bar/
(Optional) Step 2: Incremental migration
-
Generate ChangeLogs.
To perform an incremental migration from a semi-managed JindoFS cluster to the OSS-HDFS service, use the Jindo tool to convert the AuditLogs of the cluster into ChangeLogs for the relevant directory.
-
Syntax
jindo distjob -mkchangelog -auditLogDir <auditLogDir> -changeLogDir <changeLogDir> -startTime <startTime>Parameters
Parameter
Description
-auditLogDir
The path where the AuditLogs of the semi-managed JindoFS cluster are stored.
-changeLogDir
The output path for the ChangeLogs.
-startTime
The start time for processing AuditLogs.
-
Example
The AuditLogs of the semi-managed JindoFS cluster are in the oss://examplebucket/sysinfo/auditlog path. The generated ChangeLogs are stored in the oss://examplebucket/sysinfo/changelog path. Only AuditLogs from June 1, 2022, or later are processed.
jindo distjob -mkchangelog -auditLogDir oss://examplebucket/sysinfo/auditlog -changeLogDir oss://examplebucket/sysinfo/changelog -startTime 2022-06-01T12:00:00Z
-
-
Perform a one-time incremental migration.
Incremental metadata updates from the semi-managed JindoFS cluster are converted into ChangeLogs based on the AuditLogs. These ChangeLogs are then migrated to the OSS-HDFS service.
-
Command format
jindo distjob -migrateImport -srcPath <srcPath> -destPath <destPath> -changeLogDir <changeLogDir> -backendLoc <backendLoc> -updateParameters:
Parameter
Description
-srcPath
The source path in the semi-managed JindoFS cluster.
-destPath
The destination path in the OSS-HDFS service.
-changeLogDir
The output path for the ChangeLogs.
-backendLoc
The OSS path that corresponds to the source data blocks of the semi-managed JindoFS cluster.
-update
Enables incremental migration mode.
-
Example
Perform an incremental migration of the jfs://mycluster/foo directory from a semi-managed JindoFS cluster to the bar directory in the OSS-HDFS service. The bucket for the OSS-HDFS service is named examplebucket, and the ChangeLogs are output to the oss://logbucket/logdir/ path.
jindo distjob -migrateImport -srcPath jfs://mycluster/foo -destPath oss://examplebucket/bar/ -changeLogDir oss://logbucket/logdir/ -backendLoc oss://examplebucket/jfsdataDir -update
-
-
Optional: Perform multiple incremental migrations.