Skip to content

Commit

Permalink
If data folder is shared as volume, it is neccesary format the datano…
Browse files Browse the repository at this point in the history
…de after run the container and before start hadoop services.
  • Loading branch information
angelcervera committed Oct 6, 2015
1 parent 80128d2 commit ac8e329
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ EXPOSE 22


################### Expose volumes
VOLUME ["/opt/hadoop/logs", "/var/lib/hadoop", "/root/shared"]
VOLUME ["/opt/hadoop/logs", "/root/shared"]


################### Entry point
Expand Down
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ If you want to execute a hadoop example, for example:
mkdir /home/username/hadoop
docker run --name my-new-hadoop-2.7.1 \
-v /home/username/hadoop/logs:/opt/hadoop/logs \
-v /home/username/hadoop/data:/var/lib/hadoop \
-v /home/username/hadoop/shared:/root/shared \
-p 50070:50070 \
-p 50075:50075 \
Expand All @@ -51,7 +50,7 @@ docker run --name my-new-hadoop-2.7.1 \
After this, you will be inside of the hadoop docker container terminal.

Basically:
- Hadoop tmp folder (data folder) is in **/var/lib/hadoop** but you can access throw your mapped local folder **/home/username/hadoop/data**
- Hadoop tmp folder (data folder) is in **/var/lib/hadoop**
- Hadoop logs folder is in **/opt/hadoop/logs** but you can access throw your mapped local folder **/home/username/hadoop/logs**
- Useful folder to share files: **/root/shared** mapped to your local folder **/home/username/hadoop/shared**
- There is a big list of ports exposed, so you can map only ports that you are going to use or you can expose all replacing **-p local_port:exposed_port** by **-P** You can check the full list of ports in the [Dockfile](https://github.com/angelcervera/docker-hadoop/blob/master/Dockerfile)
Expand Down

0 comments on commit ac8e329

Please sign in to comment.