• 首页 首页 icon
  • 工具库 工具库 icon
    • IP查询 IP查询 icon
  • 内容库 内容库 icon
    • 快讯库 快讯库 icon
    • 精品库 精品库 icon
    • 问答库 问答库 icon
  • 更多 更多 icon
    • 服务条款 服务条款 icon

Hadoop集群搭建配置参考

武飞扬头像
双鱼座的老王
帮助6

来源于尚硅谷hadoop教程,具体请参考视频,此处只做备份留存

尚硅谷大数据Hadoop教程(Hadoop 3.x安装搭建到集群调优)_哔哩哔哩_bilibili

1.关于NameNode:

文件:core-site.xml

  1.  
    <?xml version="1.0" encoding="UTF-8"?>
  2.  
    <?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
  3.  
    <!--
  4.  
    Licensed under the Apache License, Version 2.0 (the "License");
  5.  
    you may not use this file except in compliance with the License.
  6.  
    You may obtain a copy of the License at
  7.  
     
  8.  
    http://www.apache.org/licenses/LICENSE-2.0
  9.  
     
  10.  
    Unless required by applicable law or agreed to in writing, software
  11.  
    distributed under the License is distributed on an "AS IS" BASIS,
  12.  
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13.  
    See the License for the specific language governing permissions and
  14.  
    limitations under the License. See accompanying LICENSE file.
  15.  
    -->
  16.  
     
  17.  
    <!-- Put site-specific property overrides in this file. -->
  18.  
     
  19.  
    <configuration>
  20.  
    <!-- 指定 NameNode 的地址 -->
  21.  
    <property>
  22.  
    <name>fs.defaultFS</name>
  23.  
    <value>hdfs://你的IP:你的端口号</value>
  24.  
    </property>
  25.  
    <!-- 指定 hadoop 数据的存储目录 -->
  26.  
    <property>
  27.  
    <name>hadoop.tmp.dir</name>
  28.  
    <value>/opt/module/hadoop-3.1.3/data</value>
  29.  
    </property>
  30.  
    </configuration>
学新通

2.关于HDFS

文件:hdfs-site.xml

  1.  
    <?xml version="1.0" encoding="UTF-8"?>
  2.  
    <?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
  3.  
    <!--
  4.  
    Licensed under the Apache License, Version 2.0 (the "License");
  5.  
    you may not use this file except in compliance with the License.
  6.  
    You may obtain a copy of the License at
  7.  
     
  8.  
    http://www.apache.org/licenses/LICENSE-2.0
  9.  
     
  10.  
    Unless required by applicable law or agreed to in writing, software
  11.  
    distributed under the License is distributed on an "AS IS" BASIS,
  12.  
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13.  
    See the License for the specific language governing permissions and
  14.  
    limitations under the License. See accompanying LICENSE file.
  15.  
    -->
  16.  
     
  17.  
    <!-- Put site-specific property overrides in this file. -->
  18.  
     
  19.  
    <configuration>
  20.  
    <property>
  21.  
    <name>dfs.namenode.http-address</name>
  22.  
    <value>hadoop102:9870</value>
  23.  
    </property>
  24.  
    <!-- 2nn web 端访问地址-->
  25.  
    <property>
  26.  
    <name>dfs.namenode.secondary.http-address</name>
  27.  
    <value>你的IP:你的端口号</value>
  28.  
    </property>
  29.  
     
  30.  
    </configuration>
学新通

3.关于Yarn

文件:yarn-site.xml

  1.  
    <?xml version="1.0"?>
  2.  
    <!--
  3.  
    Licensed under the Apache License, Version 2.0 (the "License");
  4.  
    you may not use this file except in compliance with the License.
  5.  
    You may obtain a copy of the License at
  6.  
     
  7.  
    http://www.apache.org/licenses/LICENSE-2.0
  8.  
     
  9.  
    Unless required by applicable law or agreed to in writing, software
  10.  
    distributed under the License is distributed on an "AS IS" BASIS,
  11.  
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12.  
    See the License for the specific language governing permissions and
  13.  
    limitations under the License. See accompanying LICENSE file.
  14.  
    -->
  15.  
    <configuration>
  16.  
     
  17.  
    <!-- Site specific YARN configuration properties -->
  18.  
    <!-- 指定 MR 走 shuffle -->
  19.  
    <property>
  20.  
    <name>yarn.nodemanager.aux-services</name>
  21.  
    <value>mapreduce_shuffle</value>
  22.  
    </property>
  23.  
    <!-- 指定 ResourceManager 的地址-->
  24.  
    <property>
  25.  
    <name>yarn.resourcemanager.hostname</name>
  26.  
    <value>你的地址</value>
  27.  
    </property>
  28.  
    <!-- 环境变量的继承 -->
  29.  
    <property>
  30.  
    <name>yarn.nodemanager.env-whitelist</name>
  31.  
    <value>JAVA_HOME,HADOOP_COMMON_HOME,HADOOP_HDFS_HOME,HADOOP_CONF_DIR,CLASSPATH_PREPEND_DISTCACHE,HADOOP_YARN_HOME,HADOOP_MAPRED_HOME</value>
  32.  
    </property>
  33.  
     
  34.  
    </configuration>
学新通

4.关于配置文件mapres-site.xml

  1.  
    <?xml version="1.0"?>
  2.  
    <?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
  3.  
    <!--
  4.  
    Licensed under the Apache License, Version 2.0 (the "License");
  5.  
    you may not use this file except in compliance with the License.
  6.  
    You may obtain a copy of the License at
  7.  
     
  8.  
    http://www.apache.org/licenses/LICENSE-2.0
  9.  
     
  10.  
    Unless required by applicable law or agreed to in writing, software
  11.  
    distributed under the License is distributed on an "AS IS" BASIS,
  12.  
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13.  
    See the License for the specific language governing permissions and
  14.  
    limitations under the License. See accompanying LICENSE file.
  15.  
    -->
  16.  
     
  17.  
    <!-- Put site-specific property overrides in this file. -->
  18.  
     
  19.  
    <configuration>
  20.  
     
  21.  
    <!-- 指定 MapReduce 程序运行在 Yarn 上 -->
  22.  
    <property>
  23.  
    <name>mapreduce.framework.name</name>
  24.  
    <value>yarn</value>
  25.  
    </property>
  26.  
    </configuration>
学新通

这篇好文章是转载于:学新通技术网

  • 版权申明: 本站部分内容来自互联网,仅供学习及演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,请提供相关证据及您的身份证明,我们将在收到邮件后48小时内删除。
  • 本站站名: 学新通技术网
  • 本文地址: /boutique/detail/tanhfhbgjc
系列文章
更多 icon
同类精品
更多 icon
继续加载