Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to add a file from local file system? #54

Open
alexeytochin opened this issue May 3, 2018 · 1 comment
Open

How to add a file from local file system? #54

alexeytochin opened this issue May 3, 2018 · 1 comment

Comments

@alexeytochin
Copy link

alexeytochin commented May 3, 2018

I tried
docker exec -it namenode hadoop fs -put README.md /tmp/README.md
and got
put: `README.md': No such file or directory

@earthquakesan
Copy link
Member

Hi @lehis, you need to mount your local folder to docker container. For example:

docker run -v /local/folder/to/mount:/data --network mynetwork --env-file hadoop.env bde2020/hadoop-base:tag hdfs dfs -copyFromLocal /data/myfile /

If you want to use docker exec, then you first need to copy your README.md into your container:

docker cp README.md namenode:/data/README.md
docker exec -it namenode hadoop fs -put README.md /tmp/README.md

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants