欢迎使用CSDN-markdown编辑器

来源:互联网 发布:java面向对象程序设计 编辑:程序博客网 时间:2024/05/20 02:27

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. --><configuration> <property>                  <name>dfs.namenode.secondary.http-address</name>                 <value>master:9001</value>         </property>  <!-- 指定HDFS副本的数量 --><property><name>dfs.replication</name><value>1</value>        </property><property>      <name>dfs.namenode.name.dir</name>      <value>file:/usr/local/hadoop/tmp/dfs/name</value></property>  <property>      <name>dfs.datanode.data.dir</name>      <value>file:/usr/local/hadoop/tmp/dfs/data</value></property>  <property>                   <name>dfs.webhdfs.enabled</name>                    <value>true</value>           </property>  </configuration>

mapred-sit.xml

<?xml version="1.0"?><?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><!-- 指定mr运行在yarn上 --><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>

hdfs-site.xml

<?xml version="1.0"?><?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><!-- 指定mr运行在yarn上 --><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>

yarn-site.xml

<?xml version="1.0"?><!--  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><!-- Site specific YARN configuration properties --><!-- 指定YARN的老大(ResourceManager)的地址 --><property>    <name>yarn.resourcemanager.hostname</name>    <value>master</value></property><!-- reducer获取数据的方式 -->  <property>                                                                  <name>yarn.nodemanager.aux-services.mapreduce.shuffle.class</name>                 <value>org.apache.hadoop.mapred.ShuffleHandler</value>          </property>   <property>                 <name>yarn.resourcemanager.address</name>                 <value>master:8032</value>         </property>         <property>                 <name>yarn.resourcemanager.scheduler.address</name>                 <value>master:8030</value>         </property>         <property>              <name>yarn.resourcemanager.resource-tracker.address</name>               <value>master:8031</value>        </property>        <property>                <name>yarn.resourcemanager.admin.address</name>                 <value>master:8033</value>         </property>         <property>                 <name>yarn.resourcemanager.webapp.address</name>                 <value>master:8088</value>         </property>  </configuration>
0 0
原创粉丝点击