Init galaxy-fds-migration-tool repo
A MapReduce tool to migrate objects or files parallely between different object storage systems like AWS S3, XIAOMI Galaxy FDS and so on.
The source and target for migiration is set by the configs: migration.source.class and migration.target.class. Current suppoted source classes are
Othe sources can be supported by a class implementing Source interface.
To support the AWS S3 as a migration source, following configs must be set.
<property> <name>migration.source.class</name> <value>com.xiaomi.infra.galaxy.fds.source.S3Source</value> </property> <property> <name>migration.source.s3.endpoint.name</name> <value>${endpoint-name}</value> </property> <property> <name>migration.source.s3.bucket.name</name> <value>${bucket-name}</value> </property> <property> <name>migration.source.s3.access.key</name> <value>${access-key}</value> </property> <property> <name>migration.source.s3.access.secret</name> <value>${access-secret}</value> </property>
If the AWS S3 is the migration target, you need change the prefix “migration.source” to “migration.target”.
To support the XIAOMI Galaxy FDS as a migration source, following configs must be set.
<property> <name>migration.source.class</name> <value>com.xiaomi.infra.galaxy.fds.source.FDSSource</value> </property> <property> <name>migration.source.fds.region.name</name> <value>${region-name}</value> </property> <property> <name>migration.source.fds.bucket.name</name> <value>${bucket-name}</value> </property> <property> <name>migration.source.fds.access.key</name> <value>${access-key}</value> </property> <property> <name>migration.source.fds.access.secret</name> <value>${access-secret}</value> </property>
If the FDS is the migration target, you need change the prefix “migration.source” to “migration.target”.
HTTP source only can be the migration source.
<property> <name>migration.source.class</name> <value>com.xiaomi.infra.galaxy.fds.source.HTTPSource</value> </property> <property> <name>migration.source.http.url.pattern</name> <value>${url-pattern}</value> </property> <property> <name>migration.source.http.downloader.list</name> <value>ip1,ip2</value> </property>
Set the configs for the migration source and target, then run following cmds:
bash target/galaxy-fds-migration-tool-1.0-SNAPSHOT/bin/migration.sh -conf conf/job-local.xml list prefix fileList bash target/galaxy-fds-migration-tool-1.0-SNAPSHOT/bin/migration.sh -conf conf/job-local.xml copy demo.input output/
hadoop jar target/galaxy-fds-migration-tool-1.0-SNAPSHOT-jar-with-dependencies.jar com.xiaomi.infra.galaxy.fds.migration.Migration -conf conf/job-yarn.xml list hdfs:///user/input/fileList hadoop jar target/galaxy-fds-migration-tool-1.0-SNAPSHOT-jar-with-dependencies.jar com.xiaomi.infra.galaxy.fds.migration.Migration -Dmapreduce.job.user.classpath.first=true -Dmapreduce.application.classpath="./" -conf conf/job-yarn.xml copy hdfs:///user/input hdfs:///user/output
版权所有:中国计算机学会技术支持:开源发展技术委员会 京ICP备13000930号-9 京公网安备 11010802032778号
Galaxy FDS Migration Tool
A MapReduce tool to migrate objects or files parallely between different object storage systems like AWS S3, XIAOMI Galaxy FDS and so on.
Config
The source and target for migiration is set by the configs: migration.source.class and migration.target.class. Current suppoted source classes are
Othe sources can be supported by a class implementing Source interface.
AWS S3
To support the AWS S3 as a migration source, following configs must be set.
If the AWS S3 is the migration target, you need change the prefix “migration.source” to “migration.target”.
XIAOMI Galaxy FDS(dev.xiaomi.com)
To support the XIAOMI Galaxy FDS as a migration source, following configs must be set.
If the FDS is the migration target, you need change the prefix “migration.source” to “migration.target”.
HTTPSource
HTTP source only can be the migration source.
Run
Local Test
Set the configs for the migration source and target, then run following cmds:
Yarn Mode
Set the configs for the migration source and target, then run following cmds:
TODO