hadoop2.4.0 安装配置 (2)
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>Master:9001</value>
</property> <property>
<name>dfs.webhdfs.enabled</name>
<value>true</value>
</property> <property>
<name>dfs.replication</name>
<!-- dfs.replication -它决定着 系统里面的文件块的数据备份个数。 对于一个实际的应用,它应该被设为3(这个 数字并没有上限,但更多的备份可能并没有作用,而且会占用更多的空间)。 少于三个的备份,可能会影响到数据的 可靠性(系统故障时,也许会造成数据丢失) -->
<value>1</value>
</property>
<property>
<name>hadoop.tmp.dir</name> <value>/usr/local/hadoop-2.4.0/tmp</value>
<description>A base for other temporary directories.</description>
</property>
<property>
<name>dfs.name.dir</name>
<!-- dfs.name.dir - 这是NameNode结点存储hadoop文件系统信息的本地系统路径。 这个值只对NameNode有效,DataNode并不需要使用到它。 上面对于/temp类型的警告,同样也适用于这里。在实际应用中,它最好被覆盖掉。 -->
<value>/usr/local/hadoop-2.4.0/dfs/name</value>
</property>
<property>
<name>dfs.data.dir</name>
<!-- dfs.data.dir - 这是DataNode结点被指定要存储数据的本地文件系统路径。 DataNode结点上 的这个路径没有必要完全相同,因为每台机器的环境很可能是不一样的。 但如果每台机器上的这 个路径都是统一配置的话,会使工作变得简单一些。 默认的情况下,它的值hadoop.tmp.dir, 这 个路径只能用于测试的目的,因为,它很可能会丢失掉一些数据。所以,这个值最好还是被覆 盖。 -->
<value>/usr/local/hadoop-2.4.0/dfs/data</value>
</property>
<!-- 解决:org.apache.hadoop.security.AccessControlException:Permission denied:user=Administrator,access=WRITE,inode="tmp":root:supergroup:rwxr-xr-x。因为Eclipse使用hadoop插件提交作业时,会默认以 DrWho身份去将作业写入hdfs文件系统中,对应的也就是 HDFS 上的/user/hadoop , 由于 DrWho用户对hadoop目录并没有写入权限,所以导致异常的发生。解决方法为:放开 hadoop 目录的权限, 命令如下 :$ hadoop fs -chmod 777 /user/hadoop -->
<property>
<name>dfs.permissions</name>
<value>false</value>
<description>If "true", enable permission checking in HDFS. If "false", permission checking is turned off, but all other behavior is unchanged. Switching from one parameter value to the other does not change the mode, owner or group of files or directories</description>
</property> </configuration>
core-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. -->
<!-- Put site-specific property overrides in this file. -->
<configuration>
<property>
<name>fs.default.name</name>
<!-- fs.default.name -这是一个描述集群中NameNode结点的URI(包括协议、主机名称、端口号),集群里面的每一台机器都需要知道NameNode的地址。DataNode结点会先在NameNode上注册,这样它们的数据才可以被使用。独立的客户端程序通过这个URI跟DataNode交互,以取得文件的块列表。-->
<value>hdfs://Master:9000</value>
</property>
<property>
<name>hadoop.tmp.dir</name>
<!-- hadoop.tmp.dir 是hadoop文件系统依赖的基础配置,很多路径都依赖它。如果hdfs-site.xml中不配 置namenode和datanode的存放位置,默认就放在这个路径中Hadoop的默认临时路径,这个最好配置,然后在新增节点或者其他情况下莫名其妙的DataNode启动不了,就删除此文件中的tmp目录即可。 不过如果删除了NameNode机器的此目录,那么就需要重新执行NameNode格式化的命令了。 -->
<value>/usr/local/hadoop-2.4.0/tmp</value>
<description>A base for other temporary directories.</description>
</property>
<property>
<name>io.file.buffer.size</name>
<value>131072</value>
</property>
<!-- 添加httpfs的选项 -->
<property>
<name>hadoop.proxyuser.hduser.hosts</name>
<value>*</value>
</property>
<property>
<name>hadoop.proxyuser.hduser.groups</name>
<value>*</value>
</property> <property>
<name>hadoop.native.lib</name>
<value>true</value>
<description>Should native hadoop libraries, if present, be used.</description>
</property>
</configuration>
yarn-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>mapreduce.framework.name</name>
<value>yarn</value>
</property>
<!--
<property>
<name>mapreduce.jobhistory.address</name>
<value>Master:10020</value>
</property>
<property>
<name>mapreduce.jobhistory.webapp.address</name>
<value>Master:19888</value>
</property> -->
</configuration>
<?xml version="1.0" encoding="utf-8"?> <!--
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.
--> <configuration>
<property>
<name>yarn.resourcemanager.hostname</name>
<value>Master</value>
</property> <property>
<name>yarn.resourcemanager.hostname</name>
<value>0.0.0.0</value>
</property>
</configuration>
yarn.nodemanager.hostname如果配置成具体的IP,如10.12.154.79,则会导致每个NamoManager的配置不同。详细配置可参考:
http://hadoop.apache.org/docs/current/hadoop-yarn/hadoop-yarn-common/yarn-default.xml。
hadoop2.4.0 安装配置 (2)的更多相关文章
- HADOOP2.2.0安装配置指南
一. 集群环境搭建 这里我们搭建一个由三台机器组成的集群: Ip地址 用户名/密码 主机名 集群中角色 操作系统版本 192.168.0.1 hadoop/hadoop Hadoop-mast ...
- Hadoop2.2.0安装配置手册!完全分布式Hadoop集群搭建过程~(心血之作啊~~)
http://blog.csdn.net/licongcong_0224/article/details/12972889 历时一周多,终于搭建好最新版本hadoop2.2集群,期间遇到各种问题,作为 ...
- Hadoop2.2.0安装配置手册
第一部分 Hadoop 2.2 下载 Hadoop我们从Apache官方网站直接下载最新版本Hadoop2.2.官方目前是提供了linux32位系统可执行文件,所以如果需要在64位系统上部署则需要单独 ...
- linux上hadoop2.4.0安装配置
1 环境准备 安装java-1.6(jdk) 安装ssh 1.1 安装jdk (1)下载安装jdk 在/usr/lib下创建java文件夹,输入命令: cd /usr/lib mkdir java 输 ...
- Hadoop2.6.0安装 — 集群
文 / vincentzh 原文连接:http://www.cnblogs.com/vincentzh/p/6034187.html 这里写点 Hadoop2.6.0集群的安装和简单配置,一方面是为自 ...
- Hadoop-2.4.0安装和wordcount执行验证
Hadoop-2.4.0安装和wordcount执行验证 下面描写叙述了64位centos6.5机器下,安装32位hadoop-2.4.0,并通过执行 系统自带的WordCount样例来验证服务正确性 ...
- CentOS 7.0安装配置Vsftp服务器
一.配置防火墙,开启FTP服务器需要的端口 CentOS 7.0默认使用的是firewall作为防火墙,这里改为iptables防火墙. 1.关闭firewall: systemctl stop fi ...
- CentOS 7.0安装配置LAMP服务器(Apache+PHP+MariaDB)
CentOS 7.0默认使用的是firewall作为防火墙,这里改为iptables防火墙. 1.关闭firewall: systemctl stop firewalld.service #停止fir ...
- CentOS 7.0安装配置Vsftp服务器步骤详解
安装Vsftp讲过最多的就是在centos6.x版本中了,这里小编看到有朋友写了一篇非常不错的CentOS 7.0安装配置Vsftp服务器教程,下面整理分享给各位. 一.配置防火墙,开启FTP服务器需 ...
随机推荐
- 用grunt搭建自动化的web前端开发环境-完整教程
原稿:http://www.cnblogs.com/wangfupeng1988/p/4561993.html#!comments jQuery在使用grunt,bootstrap在使用grunt,百 ...
- 关于windows中的任务管理调度器
windows中的任务管理调度器 任务管理调度器大概就是给windows设置一个任务,同时还可以设置这个任务的执行时间,执行次数等. 这个任务管理调度器是公司培训同事在讲studio中的job可以在s ...
- saltstack实战2--远程执行之返回(returner)
saltstack有3大功能:远程执行,配置管理,云管理 其中远程执行又可分解为:目标,模块,返回 这3个部分. 比如下面语句 [root@master ~]# salt '*' test.ping ...
- 跨域方法之CORS
跨域的方法非常之多,如果想了解其中CORS,不要浪费时间,看下面三个就够了 了解CORS https://developer.mozilla.org/en-US/docs/Web/HTTP/Acc ...
- 【转】MyBatis学习总结(三)——优化MyBatis配置文件中的配置
[转]MyBatis学习总结(三)——优化MyBatis配置文件中的配置 一.连接数据库的配置单独放在一个properties文件中 之前,我们是直接将数据库的连接配置信息写在了MyBatis的con ...
- 在DataTable中添加行和列数据
DataRow newRow = dtResult.NewRow(); newRow["ProName"] = "名字"; newRow["ProPr ...
- 20160509-hibernate--继承映射
继承映射 对象模型(Java类结构) 一个类继承体系一张表(subclass)(表结构) 1.一个类继承体系一张表(subclass)(映射文件) <class name="Emplo ...
- Git版本管理:Windows下Git配置与使用指南 Gitlab
简要介绍:Git是一个开源的分布式版本控制系统,用以有效.高速的处理从很小到非常大的项目版本管理. 一.安装 软件:msysGit-fullinstall-1.8.1.2 打开之后设置安装路径,默认为 ...
- Objective-C 学习笔记(Day 2)
------------------------------------------- 如何根据题目准确完整清晰的声明一个类并实现给定的行为 /* //下面这个程序教大家如何根据题目去声明一个类,并 ...
- NOIP200905
暴力,简单,,, 题目好长,差点没读完 试题描述 R国和S国正陷入战火之中,双方都互派间谍,潜入对方内部,伺机行动.历经艰险后,潜伏于S国的R国间谍小C终于摸清了S国军用密码的编码规则:1)S国军方内 ...