Skip to content

Instantly share code, notes, and snippets.

@qyf404
Last active March 1, 2018 03:41
Show Gist options
  • Save qyf404/973e0830dcc9eddc87f584bc83de6def to your computer and use it in GitHub Desktop.
Save qyf404/973e0830dcc9eddc87f584bc83de6def to your computer and use it in GitHub Desktop.
up hadoop by docker
version: '2'
services:
namenode:
image: uhopper/hadoop-namenode:2.7.2
hostname: namenode
container_name: namenode
domainname: hadoop
ports:
- 50070:50070
volumes:
- /Users/yfqi/data/hadoop/dfs/name:/hadoop/dfs/name
environment:
- GANGLIA_HOST=192.168.6.75
- CLUSTER_NAME=qyfhdfs
datanode1:
image: uhopper/hadoop-datanode:2.7.2
hostname: datanode1
container_name: datanode1
domainname: hadoop
volumes:
- /Users/yfqi/data/hadoop/dfs/data1:/hadoop/dfs/data
environment:
- GANGLIA_HOST=192.168.6.75
- CORE_CONF_fs_defaultFS=hdfs://namenode:8020
datanode2:
image: uhopper/hadoop-datanode:2.7.2
hostname: datanode2
container_name: datanode2
domainname: hadoop
volumes:
- /Users/yfqi/data/hadoop/dfs/data2:/hadoop/dfs/data
environment:
- GANGLIA_HOST=192.168.6.75
- CORE_CONF_fs_defaultFS=hdfs://namenode:8020
resourcemanager:
image: uhopper/hadoop-resourcemanager:2.7.2
hostname: resourcemanager
container_name: resourcemanager
domainname: hadoop
ports:
- 8088:8088
environment:
- GANGLIA_HOST=192.168.6.75
- CORE_CONF_fs_defaultFS=hdfs://namenode:8020
- YARN_CONF_yarn_log___aggregation___enable=true
nodemanager1:
image: uhopper/hadoop-nodemanager:2.7.2
hostname: nodemanager1
container_name: nodemanager1
domainname: hadoop
environment:
- GANGLIA_HOST=192.168.6.75
- CORE_CONF_fs_defaultFS=hdfs://namenode:8020
- YARN_CONF_yarn_resourcemanager_hostname=resourcemanager
- YARN_CONF_yarn_log___aggregation___enable=true
- YARN_CONF_yarn_nodemanager_remote___app___log___dir=/app-logs
nodemanager2:
image: uhopper/hadoop-nodemanager:2.7.2
hostname: nodemanager2
container_name: nodemanager2
domainname: hadoop
environment:
- GANGLIA_HOST=192.168.6.75
- CORE_CONF_fs_defaultFS=hdfs://namenode:8020
- YARN_CONF_yarn_resourcemanager_hostname=resourcemanager
- YARN_CONF_yarn_log___aggregation___enable=true
- YARN_CONF_yarn_nodemanager_remote___app___log___dir=/app-logs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment