core-site.xml

<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>

<!-- Put site-specific property overrides in this file. -->

<configuration>
  <property>-------指定NameNode主机名与端口号
    <name>fs.default.name</name>
    <value>hdfs://localhost:9000</value>
  </property>
  <property>
    <name>hadoop.tmp.dir</name>
    <value>/opt/data/tmp</value>
  </property>
</configuration>

hdfs-site.xml

<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>

<!-- Put site-specific property overrides in this file. -->

<configuration>
  <property>-------设置HDFS的副本数
    <name>dfs.replication</name>
    <value>1</value>
  </property>
  <property>
    <name>dfs.permissions</name>
    <value>false</value>
  </property>
</configuration>

mapred-site.xml

 

<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>

 

<!-- Put site-specific property overrides in this file. -->

 

<configuration>
  <property>-------指定JobTracker的主机与端口号
    <name>mapred.job.tracker</name>
    <value>localhost:9001</value>
  </property>
</configuration>

masters---------指定SecondaryNameNode的位置

localhost

slavers----------指定DataNode和TaskTracker的位置

localhost

格式化

[hadoop@localhost bin]$ hadoop namenode -format

 

相关文章:

  • 2022-12-23
  • 2021-06-20
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-24
  • 2021-07-07
猜你喜欢
  • 2021-11-30
  • 2022-12-23
  • 2022-12-23
  • 2021-04-28
  • 2021-09-01
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案