update
This commit is contained in:
parent
70e59d6540
commit
7bc58000b4
@ -7,6 +7,6 @@ docker stop hadoop
|
|||||||
docker rm hadoop
|
docker rm hadoop
|
||||||
|
|
||||||
docker run -dit --name hadoop --privileged=true \
|
docker run -dit --name hadoop --privileged=true \
|
||||||
-v /data/hadoop/dfs:/dfs/data \
|
--hostname hadoop01 \
|
||||||
-p 8042 -p 8088 -p 19888 -p 50070 -p 50075 zeekling/hadoop
|
-p 8042 -p 8088 -p 19888 -p 50070 -p 50075 zeekling/hadoop
|
||||||
|
|
||||||
|
@ -33,7 +33,7 @@ RUN rm -rf /etc/yum.repos.d/*.repo
|
|||||||
|
|
||||||
COPY ./CentOS-8-reg.repo /etc/yum.repos.d/CentOS-Base.repo
|
COPY ./CentOS-8-reg.repo /etc/yum.repos.d/CentOS-Base.repo
|
||||||
|
|
||||||
RUN yum clean all && yum makecache && yum install -y openssh-server openssh-clients tar which
|
RUN yum clean all && yum makecache && yum install -y openssh-server openssh-clients tar which vim
|
||||||
|
|
||||||
RUN set -eux && \
|
RUN set -eux && \
|
||||||
yum install -y wget hostname && \
|
yum install -y wget hostname && \
|
||||||
@ -94,6 +94,6 @@ ENV YARN_NODEMANAGER_USER=yarn
|
|||||||
|
|
||||||
#EXPOSE 8020 8042 8088 9000 10020 19888 50010 50020 50070 50075 50090
|
#EXPOSE 8020 8042 8088 9000 10020 19888 50010 50020 50070 50075 50090
|
||||||
# Hadoop 3.0 changed ports :-(
|
# Hadoop 3.0 changed ports :-(
|
||||||
EXPOSE 8020 8042 8088 9000 9868 9870 10020 19888 50010 50020 50090
|
EXPOSE 9870 9871 19888 8088 9864-9869 8020 9000 9820 8032
|
||||||
|
|
||||||
CMD ["/entrypoint.sh"]
|
CMD ["/entrypoint.sh"]
|
||||||
|
@ -3,6 +3,6 @@
|
|||||||
<configuration>
|
<configuration>
|
||||||
<property>
|
<property>
|
||||||
<name>fs.defaultFS</name>
|
<name>fs.defaultFS</name>
|
||||||
<value>hdfs://localhost:8020</value>
|
<value>hdfs://localhost:9820</value>
|
||||||
</property>
|
</property>
|
||||||
</configuration>
|
</configuration>
|
||||||
|
@ -5,6 +5,10 @@
|
|||||||
<name>dfs.replication</name>
|
<name>dfs.replication</name>
|
||||||
<value>1</value>
|
<value>1</value>
|
||||||
</property>
|
</property>
|
||||||
|
<property>
|
||||||
|
<name>dfs.permissions</name>
|
||||||
|
<value>false</value>
|
||||||
|
</property>
|
||||||
<property>
|
<property>
|
||||||
<name>dfs.namenode.name.dir</name>
|
<name>dfs.namenode.name.dir</name>
|
||||||
<value>/dfs/name</value>
|
<value>/dfs/name</value>
|
||||||
|
@ -99,6 +99,8 @@ EOF
|
|||||||
fi | tee -a /root/.ssh/known_hosts
|
fi | tee -a /root/.ssh/known_hosts
|
||||||
|
|
||||||
mkdir -pv /hadoop/logs
|
mkdir -pv /hadoop/logs
|
||||||
|
mkdir -p /dfs/data
|
||||||
|
chown -R hdfs:hadoop /dfs/
|
||||||
|
|
||||||
sed -i "s/localhost/$hostname/" /hadoop/etc/hadoop/core-site.xml
|
sed -i "s/localhost/$hostname/" /hadoop/etc/hadoop/core-site.xml
|
||||||
if [ -f "/run/nologin" ];then
|
if [ -f "/run/nologin" ];then
|
||||||
@ -107,6 +109,4 @@ EOF
|
|||||||
start-dfs.sh
|
start-dfs.sh
|
||||||
start-yarn.sh
|
start-yarn.sh
|
||||||
tail -f /dev/null /hadoop/logs/*
|
tail -f /dev/null /hadoop/logs/*
|
||||||
stop-yarn.sh
|
|
||||||
stop-dfs.sh
|
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user