Skip to content

Commit

Permalink
expose namenode and resourcemanager port
Browse files Browse the repository at this point in the history
  • Loading branch information
kiwenlau committed Jun 9, 2016
1 parent 4cf6e06 commit 4ad6add
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 10 deletions.
6 changes: 3 additions & 3 deletions build-image.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#!/bin/bash

echo -e "\nbuild docker hadoop-base image\n"
sudo docker build -f hadoop-base/Dockerfile -t kiwenlau/hadoop-base:1.0.0 ./hadoop-base
# echo -e "\nbuild docker hadoop-base image\n"
# sudo docker build -f hadoop-base/Dockerfile -t kiwenlau/hadoop-base:1.0.0 ./hadoop-base

echo ""
# echo ""


echo -e "\nbuild docker hadoop-master image\n"
Expand Down
12 changes: 6 additions & 6 deletions hadoop-master/files/hdfs-site.xml
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
<configuration>
<property>
<name>dfs.datanode.data.dir</name>
<value>file:///root/hdfs/datanode</value>
<description>DataNode directory</description>
</property>
<property>
<name>dfs.namenode.name.dir</name>
<value>file:///root/hdfs/namenode</value>
<description>NameNode directory for namespace and transaction logs storage.</description>
</property>
<property>
<name>dfs.datanode.data.dir</name>
<value>file:///root/hdfs/datanode</value>
<description>DataNode directory</description>
</property>

<property>
<name>dfs.replication</name>
Expand All @@ -22,7 +22,7 @@
<value>false</value>
</property>

<property>
<property>
<name>dfs.datanode.use.datanode.hostname</name>
<value>false</value>
</property>
Expand Down
10 changes: 9 additions & 1 deletion start-container.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,15 @@ N=${1:-3}
# start hadoop master container
sudo docker rm -f hadoop-master > /dev/null
echo "start hadoop-master container..."
sudo docker run -d -t -P --name hadoop-master -h hadoop-master -w /root --net=hadoop kiwenlau/hadoop-master:1.0.0 &> /dev/null
sudo docker run -itd \
--net=hadoop \
-p 50070:50070 \
-p 8088:8088 \
-p 19888:19888 \
--name hadoop-master \
-h hadoop-master \
-w /root \
kiwenlau/hadoop-master:1.0.0 &> /dev/null

# get the IP address of master container
FIRST_IP=$(sudo docker inspect --format="{{.NetworkSettings.IPAddress}}" hadoop-master)
Expand Down

0 comments on commit 4ad6add

Please sign in to comment.