在Linux单机上运行Hadoop-0.20.0实例


其实,Hadoop-0.20.0与Hadoop-0.19.0的入门运行非常相似,基本步骤都是相同的。不同的是:Hadoop-0.19.0的配置文件hadoop-site.xml中内容,在Hadoop-0.20.0的配置中进行了拆分,分别放在三个配置文件中,如下:

1、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>
    <name>fs.default.name</name>
    <value>hdfs://localhost:9000</value>
  </property>
</configuration>

2、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>
    <name>dfs.replication</name>
    <value>1</value>
  </property>
</configuration>

3、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>
    <name>mapred.job.tracker</name>
    <value>localhost:9001</value>
  </property>
</configuration>

除了这一处不同之外,运行的基本过程与Hadoop-0.19.0相同,可以非常容易地运行wordcount实例。

这里,主要是讨论几点,在运行Hadoop-0.20.0例子的过程,出现的几个异常,及其问题出现的原因和解决方法。

  • 1
  • 2
  • 3
  • 下一页

相关内容