Yarn-高可用集群

修改配置文件yarn-site.xml:




  
    yarn.nodemanager.aux-services
    mapreduce_shuffle
  
 
  
     yarn.resourcemanager.ha.enabled
     true
  
 
  
    yarn.resourcemanager.cluster-id
    cluster-yarn1
  
 
  
    yarn.resourcemanager.ha.rm-ids
    rm1,rm2,rm3
  

  
  
    yarn.resourcemanager.hostname.rm1
    hadoop-4
  


 yarn.resourcemanager.webapp.address.rm1
 hadoop-4:8088



 yarn.resourcemanager.address.rm1
 hadoop-4:8032



yarn.resourcemanager.scheduler.address.rm1 
 hadoop-4:8030

 

 yarn.resourcemanager.resource-tracker.address.rm1
 hadoop-4:8031


 
 
 yarn.resourcemanager.hostname.rm2
 hadoop-5


 yarn.resourcemanager.webapp.address.rm2
 hadoop-5:8088


 yarn.resourcemanager.address.rm2
 hadoop-5:8032


 yarn.resourcemanager.scheduler.address.rm2
 hadoop-5:8030


 yarn.resourcemanager.resource-tracker.address.rm2
 hadoop-5:8031



 
 yarn.resourcemanager.hostname.rm3
 hadoop-6



 yarn.resourcemanager.webapp.address.rm3
 hadoop-6:8088



 yarn.resourcemanager.address.rm3
hadoop-6:8032



 yarn.resourcemanager.scheduler.address.rm3 
 hadoop-6:8030

 

 yarn.resourcemanager.resource-tracker.address.rm3
 hadoop-6:8031

  
 
 yarn.resourcemanager.zk-address
 hadoop-4:2181,hadoop-5:2181,hadoop-6:2181
 
  
 
 yarn.resourcemanager.recovery.enabled
 true
 
  
 
 yarn.resourcemanager.store.class 
org.apache.hadoop.yarn.server.resourcemanager.recovery.ZKRMStateStore



 yarn.nodemanager.env-whitelist
  JAVA_HOME,HADOOP_COMMON_HOME,HADOOP_HDFS_HOME,HADOOP_CONF_DIR,CLASSPATH_PREPEND_DISTCACHE,HADOOP_YARN_HOME,HADOOP_MAPRED_HOME
 

 
   yarn.log-aggregation-enable
   true
 

 
   yarn.log.server.url
   http://hadoop-4:19888/jobhistory/logs
 

 
   yarn.log-aggregation.retain-seconds
   6048000
 

获取yarn集群状态:
yarn rmadmin -getServiceState rm1
启动hadoop集群:
start-all.sh

yarn-web端

http://192.168.0.120:8088/clu...

其他:

配置Windows10的hosts文件,C:\Windows\System32\drivers\etc
${hadoop-path}/etc/hadoop/works配置datanode和nodemanager的节点

你可能感兴趣的:(yarn)