前置配置: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. Deepin中安装使用好用的字典GoldenDict

    2020-03-21   23:08:17 不说废话直接来安装步骤: 打开Deepin的应用商店,输入GoldenDict查找: 找到后点击安装,然后等待一小会,电脑提示音告诉你已经安装完成: 然后再 ...

  2. springboot集成axis1.4

    1.首先通过axis工具根据wsdl文件生成java代码和wsdd文件 set Axis_Lib=/Users/apple/configuration/axis-1_4/lib //lib文件目录se ...

  3. spring的ioc依赖注入的三种方法(xml方式)

    常见的依赖注入方法有三种:构造函数注入.set方法注入.使用P名称空间注入数据.另外说明下注入集合属性 先来说下最常用的那个注入方法吧. 一.set方法注入 顾名思义,就是在类中提供需要注入成员的 s ...

  4. vscode 配置c++记录

    c_cpp_properties.json { "configurations": [ { "name": "MinGW", "i ...

  5. wr720n v4 折腾笔记(四):安装inode客户端njitclient

    前记: 既然折腾到这里,那就不怕再折腾一下了,之前说过最终还是安装南浦月大神的固件,折腾了一圈,怎么不直接在官方界面上安装呢,这里给出直接安装的方法,就是修改固件头为wr720nv4. 0x01 修改 ...

  6. deepin 系统 ssh,samba,redis,取消开机密码等相关配置

    ssh安装 sudo apt-get install openssh-server service ssh start ssh root 用户登入配置 安装完毕,运行命令"sudo vi / ...

  7. adb软件国产安卓手机对系统的把控

    国产安卓手机对系统的把控,现在想搞机的方法是愈来愈麻烦,华为最先的申请解锁码,到现在直接系统锁死不给解.让我等搞机小伙伴是望机兴叹.安卓手机的通病随着系统升级,手机就越来越卡.本想通过卸载系统自带应用 ...

  8. Building Applications with Force.com and VisualForce(Dev401)(十):Designing Applications for Multiple Users: Building Business Processes that You Want

    Dev401-011: Building Business Processes that You Want Course Objectives1.Describe the capabilities o ...

  9. mybatis入门四 解决字段名与实体类属性名不相同的冲突

    一.创建测试需要使用的表和数据 CREATE TABLE orders( order_id INT PRIMARY KEY AUTO_INCREMENT, order_no VARCHAR(20), ...

  10. Mongodb中 数据库和集合的创建与删除

    1.查询数据库,查询表: show dbs //查询所有的数据库show collections //查询所有的集合(表) 2.创建数据库或切换到数据库(存在就切换,不存在就创建) use spide ...