hadoop(七)集群配置同步(hadoop完全分布式四)|9
前置配置: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的更多相关文章
- 【Hadoop】集群配置要点
1.SSH免密码登录 1.1生成公钥,一直enter,直到完成 dream361@master:~$ ssh-keygen -t rsa 1.2传送公钥 dream361@master:~$ scp ...
- Hadoop,HBase集群环境搭建的问题集锦(四)
21.Schema.xml和solrconfig.xml配置文件里參数说明: 參考资料:http://www.hipony.com/post-610.html 22.执行时报错: 23., /comm ...
- Hadoop 2.6.4单节点集群配置
1.安装配置步骤 # wget http://download.oracle.com/otn-pub/java/jdk/8u91-b14/jdk-8u91-linux-x64.rpm # rpm -i ...
- hadoop(八)集群namenode启动ssh免密登录(完全分布式五)|10
前置章节:hadoop集群配置同步(hadoop完全分布式四)|10 启动namenode之前: 1. 先查看有无节点启动,执行jps查看,有的话停掉 [shaozhiqi@hadoop102 ~]$ ...
- Hadoop的集群和优化
Hadoop的集群和优化 Hadoop集群规模小到几个节点就可以组件一个集群,大到由几千个节点组成的超大集群. 在安装Hadoop集群时,把要安装的软件解压到集群内的所有机器上,软件的安装目录也要一致 ...
- Hadoop(25)-高可用集群配置,HDFS-HA和YARN-HA
一. HA概述 1. 所谓HA(High Available),即高可用(7*24小时不中断服务). 2. 实现高可用最关键的策略是消除单点故障.HA严格来说应该分成各个组件的HA机制:HDFS的HA ...
- CentOS6安装各种大数据软件 第四章:Hadoop分布式集群配置
相关文章链接 CentOS6安装各种大数据软件 第一章:各个软件版本介绍 CentOS6安装各种大数据软件 第二章:Linux各个软件启动命令 CentOS6安装各种大数据软件 第三章:Linux基础 ...
- hadoop之完全分布式集群配置(centos7)
一.基础环境 现在我们有两台虚拟机了,再克隆两台: 克隆好之后需要做三件事:1.更改主机名称 2.修改ip地址 3.将ip地址和对应的主机号加入到/etc/hosts文件中 1.永久修改主机名 hos ...
- Hadoop入门学习笔记-第二天 (HDFS:NodeName高可用集群配置)
说明:hdfs:nn单点故障,压力过大,内存受限,扩展受阻.hdfs ha :主备切换方式解决单点故障hdfs Federation联邦:解决鸭梨过大.支持水平扩展,每个nn分管一部分目录,所有nn共 ...
随机推荐
- 使用C#+EmguCV处理图像入门(图像读取_显示_保存)二
上个随笔已经介绍EmguCV的一些常用库和程序安装以及环境变量的配置,这次写的是如何使用这个类库对图像进行操作. EmguCV图像处理系统组成(个人见解): 图像的基本操作: 贴个代码: using ...
- java集合-把商品放入集合中调用(新手)
//创建的一个包名. package qige; //导入的一个包.import java.util.*; //定义一个类.public class Ipcs { //公共静态的主方法. public ...
- WEB应用之httpd基础入门(一)
前文我们聊了下http协议web服务的一些常识和httpd服务器软件三种响应模型的简单介绍,回顾请参考https://www.cnblogs.com/qiuhom-1874/p/12515075.ht ...
- angular自启动过程
angularJS的源代码整体上来说是一个自执行函数,在angularJS加载完成后,就会自动执行了. 即,在window上暴露一个唯一的全局对象angular, 如果window.angular已经 ...
- 知识图谱与机器学习 | KG入门 -- Part1 Data Fabric
介绍 如果你在网上搜索机器学习,你会找到大约20500万个结果.确实是这样,但是要找到适合每个用例的描述或定义并不容易,然而会有一些非常棒的描述或定义.在这里,我将提出机器学习的另一种定义,重点介绍一 ...
- DOM 操作成本到底高在哪儿?
从我接触前端到现在,一直听到的一句话:操作DOM的成本很高,不要轻易去操作DOM.尤其是React.vue等MV*框架的出现,数据驱动视图的模式越发深入人心,jQuery时代提供的强大便利地操作DOM ...
- Mysql性能优化:为什么你的count(*)这么慢?
导读 在开发中一定会用到统计一张表的行数,比如一个交易系统,老板会让你每天生成一个报表,这些统计信息少不了 sql 中的count函数. 但是随着记录越来越多,查询的速度会越来越慢,为什么会这样呢?M ...
- 非常诡异的IIS下由配置文件加上svg的mime头导致整个网站的静态文件访问报错误
调试了两天遇到一个非常诡异的问题 一个系统稳定运行了很多年,是用mvc5+WIN2008R2 + .NET 4.5 +IIS环境下运行,非常稳定,最近想迁移到一台新的服务器,为了少麻烦在阿里云上买了 ...
- iOS App的启动过程
一.mach-O Executable 可执行文件 Dylib 动态库 Bundle 无法被连接的动态库,只能通过 dlopen() 加载 Image 指的是 Executable,Dylib 或者 ...
- dome 模块 pyaudio 声音处理 为语音识别准备
dome 模块 pyaudio 声音处理 为语音识别准备 直接上例子 dome1 声音强度检查 import pyaudio import numpy as np class QAudio: CHUN ...