前置配置:rsync远程同步|xsync集群分发(hadoop完全分布式准备三)|9

1. 分布式集群分配原则

部署分配原则

说明
Namenode和secondarynamenode占用内存较大,建议两个分开。我们的环境都是本地虚拟机,部署在一起内存不够。
Resourcemanager是资源保障,比较耗资源,所以错开前两个。

2. 修改hadoop核心配置文件core-site.xml

[shaozhiqi@hadoop102 hadoop]$ vi core-site.xml
vi core-sit.xml <configuration>
<property>
<name>fs.defaultFS</name>
<value>hdfs://hadoop102:9000</value>
</property>
<property>
<name>hadoop.tmp.dir</name>
<value>/opt/module/hadoop-3.1.2/data/tmp</value>
</property>
</configuration>

3. HDFS配置文件

修改hadoop-evn.sh 让在分布式时获取java配置
由于我们是copy的hadoop文件(在之前的伪分布式中已经配置过了所以不用配了)

[shaozhiqi@hadoop102 hadoop]$ vi hadoop-env.sh
# JAVA_HOME=/usr/java/testing hdfs dfs -ls
export JAVA_HOME=/opt/module/jdk1.8.0_211

配置hdfs-site.xml
指定 Hadoop辅助名称节点主机配置,删除副本数配置,系统默认是3,我们呢改成三配上也没啥意义,所以删掉

[shaozhiqi@hadoop102 hadoop]$ vi hdfs-site.xml
<configuration>
<property>
<name>dfs.replication</name>
<value>1</value>
</property>
<property>
<name>dfs.namenode.secondary.http-address</name>
<value>hadoop104:50090</value>
</property>
</configuration>

4. 配置yarn

配置yarn-env.sh

[shaozhiqi@hadoop102 hadoop]$ vi yarn-env.sh
export JAVA_HOME=/opt/module/jdk1.8.0_211

配置yarn-site.xml
配置获取数据方式,配置resoucemanager的地址

[shaozhiqi@hadoop102 hadoop]$ vi yarn-site.xml
<configuration> <!-- Site specific YARN configuration properties -->
<property>
<name> yarn.nodemanager.aux-services</name>
<value>mapreduce_shuffle</value>
</property>
<property>
<name>yarn.resourcemanager.hostname</name>
<value> hadoop103</value>
</property>
</configuration>

5. 配置mapReduce

配置mapred-env.sh

[shaozhiqi@hadoop102 hadoop]$ vi mapred-env.sh
export JAVA_HOME=/opt/module/jdk1.8.0_211

配置mapred-site.xml

[shaozhiqi@hadoop102 hadoop]$ vi mapred-site.xml
<property>
<name>mapreduce.framework.name</name>
<value>yarn</value>
</property>

6. 执行我们的脚本,同步我们的配置好的文件到其他机器

执行脚本

[shaozhiqi@hadoop103 hadoop]$ testxsync /opt/module/hadoop-3.1.2/

验证结果
说明:去103 104验证找一个文件看下就行
103

[shaozhiqi@hadoop103 hadoop]$ cat  hdfs-site.xml
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
<!--
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License. See accompanying LICENSE file.
-->
<!-- Put site-specific property overrides in this file. -->
<configuration>
<property>
<name>dfs.namenode.secondary.http-address</name>
<value>hadoop104:50090</value>
</property>
</configuration>
[shaozhiqi@hadoop103 hadoop]$

104

[shaozhiqi@hadoop104 hadoop]$ cat  hdfs-site.xml
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
<!--
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License. See accompanying LICENSE file.
-->
<!-- Put site-specific property overrides in this file. -->
<configuration>
<property>
<name>dfs.namenode.secondary.http-address</name>
<value>hadoop104:50090</value>
</property>
</configuration>
[shaozhiqi@hadoop104 hadoop]$

hadoop(七)集群配置同步(hadoop完全分布式四)|9的更多相关文章

  1. 【Hadoop】集群配置要点

    1.SSH免密码登录 1.1生成公钥,一直enter,直到完成 dream361@master:~$ ssh-keygen -t rsa 1.2传送公钥 dream361@master:~$ scp ...

  2. Hadoop,HBase集群环境搭建的问题集锦(四)

    21.Schema.xml和solrconfig.xml配置文件里參数说明: 參考资料:http://www.hipony.com/post-610.html 22.执行时报错: 23., /comm ...

  3. Hadoop 2.6.4单节点集群配置

    1.安装配置步骤 # wget http://download.oracle.com/otn-pub/java/jdk/8u91-b14/jdk-8u91-linux-x64.rpm # rpm -i ...

  4. hadoop(八)集群namenode启动ssh免密登录(完全分布式五)|10

    前置章节:hadoop集群配置同步(hadoop完全分布式四)|10 启动namenode之前: 1. 先查看有无节点启动,执行jps查看,有的话停掉 [shaozhiqi@hadoop102 ~]$ ...

  5. Hadoop的集群和优化

    Hadoop的集群和优化 Hadoop集群规模小到几个节点就可以组件一个集群,大到由几千个节点组成的超大集群. 在安装Hadoop集群时,把要安装的软件解压到集群内的所有机器上,软件的安装目录也要一致 ...

  6. Hadoop(25)-高可用集群配置,HDFS-HA和YARN-HA

    一. HA概述 1. 所谓HA(High Available),即高可用(7*24小时不中断服务). 2. 实现高可用最关键的策略是消除单点故障.HA严格来说应该分成各个组件的HA机制:HDFS的HA ...

  7. CentOS6安装各种大数据软件 第四章:Hadoop分布式集群配置

    相关文章链接 CentOS6安装各种大数据软件 第一章:各个软件版本介绍 CentOS6安装各种大数据软件 第二章:Linux各个软件启动命令 CentOS6安装各种大数据软件 第三章:Linux基础 ...

  8. hadoop之完全分布式集群配置(centos7)

    一.基础环境 现在我们有两台虚拟机了,再克隆两台: 克隆好之后需要做三件事:1.更改主机名称 2.修改ip地址 3.将ip地址和对应的主机号加入到/etc/hosts文件中 1.永久修改主机名 hos ...

  9. Hadoop入门学习笔记-第二天 (HDFS:NodeName高可用集群配置)

    说明:hdfs:nn单点故障,压力过大,内存受限,扩展受阻.hdfs ha :主备切换方式解决单点故障hdfs Federation联邦:解决鸭梨过大.支持水平扩展,每个nn分管一部分目录,所有nn共 ...

随机推荐

  1. java -封装一个类。(姓名、年龄、性别)

    //定义一个类. public class Maopao1{ //创建私有的对象. private String name; private int age; private String sex; ...

  2. Redis(十二):redis请求转发的实现

    请求转发一般的原因为: 1. 该请求自身无法处理,需要转发给对应的服务器处理: 2. 为实现负载均衡,使用路由服务,选择目标实例进行转发: 在集群模式下,请求可以打到任何一台redis服务器上.然而并 ...

  3. Python - 面向对象(三)公共变量,受保护变量,私有变量

    前言 在Python的类里面,所有属性和方法默认都是公共的:但Python也可以设置受保护.私有类型的变量or方法 受保护类型的变量.方法 一般称为:protected变量 #!/usr/bin/en ...

  4. 记一次Metasploit心脏出血漏洞攻击测试

    打开msf框架 msfconsole

  5. Jmeter之JSON提取器应用

    在接口测试中有一个这样的场景:登录之后,需要进行昵称修改,怎么实现? 首先我们分别看下登录.昵称修改的接口说明: 以上业务中补充一点,昵称修改,还需要添加请求头Authorization传登录获取的t ...

  6. 目标检测 | RetinaNet:Focal Loss for Dense Object Detection

    论文分析了one-stage网络训练存在的类别不平衡问题,提出能根据loss大小自动调节权重的focal loss,使得模型的训练更专注于困难样本.同时,基于FPN设计了RetinaNet,在精度和速 ...

  7. POJ1703 Find them Catch them 关于分集合操作的正确性证明 种类并查集

    题目链接:http://poj.org/problem?id=1703 这道题和食物链那道题有异曲同工之处,都是要处理不同集合之间的关系,而并查集的功能是维护相同集合之间的关系.这道题中有两个不同的集 ...

  8. Trie树的简单实现

    import java.util.ArrayList; import java.util.TreeMap; import util.FileOperation; public class Trie { ...

  9. Visdom 介绍 | 二

    用于创建,组织和共享实时丰富数据可视化的灵活工具.支持Python. 概述 概念 设置 用法 API 注意事项 贡献 API 要快速了解visdom的功能,请查看example目录,或阅读以下详细信息 ...

  10. 数据分析_numpy_基础2

    数据分析_numpy_基础2 sqrt 开方 arr = np.arange(10) arr # array([0, 1, 2, 3, 4, 5, 6, 7, 8, 9]) np.sqrt(arr) ...