您的位置:首页 > 运维架构

Hadoop默认模式、默认配置问题

2017-11-30 22:44 309 查看
Hadoop 的默认配置文件有哪些?

Hadoop 有没有守护进程?

Hadoop 的服务怎么启动?

Hadoop 的三种模式怎么切换?

...

static

{

Configuration.addDefaultResource("core-default.xml");

Configuration.addDefaultResource("core-site.xml");

Configuration.addDefaultResource("hdfs-default.xml");

Configuration.addDefaultResource("hdfs-site.xml");

Configuration.addDefaultResource("yarn-default.xml");

Configuration.addDefaultResource("yarn-site.xml");

Configuration.addDefaultResource("mapred-default.xml");

Configuration.addDefaultResource("mapred-site.xml");

}

Hadoop 默认运行模式是 standalone, 其中一个配置文件 core-default.xml, 位置:

hadoop-2.8.1/share/doc/hadoop/hadoop-project-dist/hadoop-common/core-default.xml
在文件中有:

<!-- file system properties -->

<property>

  <name>fs.defaultFS</name>

  <value>file:///</value>

  <description>The name of the default file system.  A URI whose

  scheme and authority determine the FileSystem implementation.  The

  uri's scheme determines the config property (fs.SCHEME.impl) naming

  the FileSystem implementation class.  The uri's authority is used to

  determine the host, port, etc. for a filesystem.</description>

</property>

<property>

  <name>fs.default.name</name>

  <value>file:///</value>

  <description>Deprecated. Use (fs.defaultFS) property

  instead</description>

</property>

在配置文件

WeiLius-iMac:hadoop-2.8.1 Wei.Liu$ pwd

/Users/Wei.Liu/Softwares/hadoop_sdk/hadoop-2.8.1

WeiLius-iMac:hadoop-2.8.1 Wei.Liu$ vim share/doc/hadoop/hadoop-mapreduce-client/hadoop-mapreduce-client-core/mapred-default.xml
在这个文件中定义:

<property>

  <name>mapreduce.framework.name</name>

  <value>local</value>

  <description>The runtime framework for executing MapReduce jobs.

  Can be one of local, classic or yarn.

  </description>

</property>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: