Giter Site home page Giter Site logo

hdfs-to-local's Introduction

hdfs-to-local

This project is deprecated in favor of the version in GitLab.

See https://gitlab.com/guangie88/hdfs-to-local.

Performs a recursive directory copy from HDFS host to local storage. Does not require any Hadoop binaries since it uses Go native implemented HDFS client library.

Requirements

How to Build

Native Build

Install the go dependencies for this project into vendor/:

glide install

Build and you are done:

go build

The compiled executable will be located at the repository root directory, and is named hdfs-to-local.

For fully statically linked executable, use the following command instead:

CGO_ENABLED=0 go build

Docker Build

This alternative method is recommended if you do not wish to up go, glide or the environment variable GOPATH, or prefer not to have this repository files not within the GOPATH.

Run the following for full compilation:

docker-compose run -u $UID:`id -g` all

Note that -u $UID:`id -g` is optional, but useful to perform the compilation under your current user's UID and GID.

The compiled executable will be located at the repository root directory, and is named hdfs-to-local. The executable is always fully statically linked.

The following commands are available to run for docker-compose:

  • all
    • Performs glide install, followed by go build.
    • e.g. docker-compose run -u $UID:`id -g` all
  • install
    • Performs only glide install.
    • e.g. docker-compose run -u $UID:`id -g` install
  • build
    • Performs only go build.
    • e.g. docker-compose run -u $UID:`id -g` build
  • clean
    • Performs go clean.
    • e.g. docker-compose run -u $UID:`id -g` clean
  • update
    • Performs glide update. Not recommended since it updates the dependencies.
    • e.g. docker-compose run -u $UID:`id -g` update

How to Run

Assuming HDFS server is running on port 9000 locally, and there is a directory at /data:

./hdfs-to-local --conf config/example.toml

For more program argument details:

./hdfs-to-local --help

hdfs-to-local's People

Contributors

guangie88 avatar

Stargazers

 avatar  avatar  avatar

Watchers

 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.