GithubHelp home page GithubHelp logo

tomzhang / galaxy-fds-migration-tool Goto Github PK

View Code? Open in Web Editor NEW

This project forked from xiaomi/galaxy-fds-migration-tool

0.0 2.0 0.0 15 KB

A MapReduce tool to migrate objects or files parallely between different object storage systems

License: Apache License 2.0

Java 100.00%

galaxy-fds-migration-tool's Introduction

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

  • com.xiaomi.infra.galaxy.fds.source.S3Source for AWS S3
  • com.xiaomi.infra.galaxy.fds.source.FDSSource for XIAOMI Galaxy FDS
  • com.xiaomi.infra.galaxy.fds.source.HTTPSource for downloading objects through http protocal

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.

  <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".

XIAOMI Galaxy FDS(dev.xiaomi.com)

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".

HTTPSource

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>

Run

Local Test

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/

Yarn Mode

Set the configs for the migration source and target, then run following cmds:

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

TODO

  • Support other object/File storage systems like HDFS, Azure Blob Storage and Aliyun OSS.

galaxy-fds-migration-tool's People

Watchers

mingfeng.zhang avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.