Skip to content

Commit ac8e329

Browse files
committed
If data folder is shared as volume, it is neccesary format the datanode after run the container and before start hadoop services.
1 parent 80128d2 commit ac8e329

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ EXPOSE 22
146146

147147

148148
################### Expose volumes
149-
VOLUME ["/opt/hadoop/logs", "/var/lib/hadoop", "/root/shared"]
149+
VOLUME ["/opt/hadoop/logs", "/root/shared"]
150150

151151

152152
################### Entry point

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ If you want to execute a hadoop example, for example:
3030
mkdir /home/username/hadoop
3131
docker run --name my-new-hadoop-2.7.1 \
3232
-v /home/username/hadoop/logs:/opt/hadoop/logs \
33-
-v /home/username/hadoop/data:/var/lib/hadoop \
3433
-v /home/username/hadoop/shared:/root/shared \
3534
-p 50070:50070 \
3635
-p 50075:50075 \
@@ -51,7 +50,7 @@ docker run --name my-new-hadoop-2.7.1 \
5150
After this, you will be inside of the hadoop docker container terminal.
5251

5352
Basically:
54-
- Hadoop tmp folder (data folder) is in **/var/lib/hadoop** but you can access throw your mapped local folder **/home/username/hadoop/data**
53+
- Hadoop tmp folder (data folder) is in **/var/lib/hadoop**
5554
- Hadoop logs folder is in **/opt/hadoop/logs** but you can access throw your mapped local folder **/home/username/hadoop/logs**
5655
- Useful folder to share files: **/root/shared** mapped to your local folder **/home/username/hadoop/shared**
5756
- 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)

0 commit comments

Comments
 (0)