1 Star 0 Fork 0

eaglet / hadoop-cluster-docker2.0

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

使用docker创建Hadoop分布式集群2.0

Hadoop Spark

Using docker create hadoop-cluster (Support JDK 8 for development)

Supported tags

docker pull e4glet/hadoop:2.0 (only include hadoop)
docker pull e4glet/hadoop:2.1(include hadoop and spark)

About Images

  1. tag:2.0 OS:Ubuntu16.04
    JDK Version:openjdk8
    Hadoop Version:2.7.2

  2. tag:2.1 OS:Ubuntu16.04
    JDK Version:openjdk8
    Hadoop Version:2.7.2
    Spark Version:2.1.3

Overview

This image can be used for develop with Eclipse JDK 1.8.0_191

Hadoop cluster construction steps for N node(N>=3)

  1. pull docker image
docker pull e4glet/hadoop:2.0
  1. clone github repository
git clone https://github.com/e4glet/hadoop-cluster-docker2.0
  1. create hadoop network
docker network create --driver=bridge hadoop
  1. Entry into the directory
cd hadoop-cluster-docker2.0
  1. rebuild images for support more nodes

Add execute permission to the script file
chmod 777 resize-cluster.sh

like this:

./resize-cluster.sh 5
  1. create container and run it
./start-container.sh 5

result:

start hadoop-master container...
start hadoop-slave1 container...
start hadoop-slave2 container...
start hadoop-slave3 container...
start hadoop-slave4 container...
root@hadoop-master:~# 
  1. start hadoop
root@hadoop-master:~#./start-hadoop.sh
  1. stop and remove container
./remove-container.sh 5

About development

  1. How to config in Eclipse
    You can Define hadoop location like this on Eclipse 2018:
    alt tag

  2. How to upload the testapp in your container
    You will need to mount a Docker volume to every location where hadoop-master writes information.The default hadoop-master requires write access to $PWD/hadoop and /root/hadoop.

Loot at your start-container.sh

-v $PWD/hadoop:/root/hadoop

If you have a more advanced application that requires hadoop-master to write to other locations, simply add more volume mounts to those locations.

like this:
输入图片说明

输入图片说明 That's so cool.AlL right?

update

  1. new tags:2.1 include spark 2.1.3

  2. start: Is the same like tags:2.0
    输入图片说明

  3. spark Web UI : http://HostIP:8040/
    输入图片说明 输入图片说明

MIT License Copyright (c) 2020 eaglet Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

using docker create hadoop-cluster(JDK8u121) Edit Manage topics 展开 收起
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
1
https://gitee.com/e4glet/hadoop-cluster-docker2.0.git
git@gitee.com:e4glet/hadoop-cluster-docker2.0.git
e4glet
hadoop-cluster-docker2.0
hadoop-cluster-docker2.0
master

搜索帮助