2

使用 hadoop 多节点设置(1 个 mater,1 个 salve)

在 master 上启动 start-mapred.sh 后,我在 TT 日志中发现以下错误(从属)

org.apache.hadoop.mapred.TaskTracker:获取系统目录失败

有人可以帮我知道可以做些什么来避免这个错误

我正在使用 Hadoop 1.2.0 jetty-6.1.26 java 版本“1.6.0_23”

mapred-site.xml 文件

<configuration>
<property>
  <name>mapred.job.tracker</name>
  <value>master:54311</value>
  <description>The host and port that the MapReduce job tracker runs
  at.  If "local", then jobs are run in-process as a single map
  and reduce task.
  </description>
</property>
<property>
  <name>mapred.map.tasks</name>
    <value>1</value>
      <description>
          define mapred.map tasks to be number of slave hosts
</description>
</property>

<property>
  <name>mapred.reduce.tasks</name>
    <value>1</value>
      <description>
          define mapred.reduce tasks to be number of slave hosts
</description>
</property>

</configuration>

核心站点.xml

<configuration>
<property>
  <name>fs.default.name</name>
  <value>hdfs://master:54310</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>hadoop.tmp.dir</name>
  <value>/home/hduser/workspace</value>
</property>
</configuration>
4

2 回答 2

2

看来您刚刚添加了 hadoop.tmp.dir 并开始了这项工作。将任何属性添加到配置文件后,您需要重新启动 Hadoop 守护程序。您已在评论中指定您在稍后阶段添加了此属性。这意味着所有数据和元数据以及其他临时文件仍在 /tmp 目录中。将所有这些内容从那里复制到您的/home/hduser/workspace目录中,重新启动 Hadoop 并重新运行该作业。

一定要让我知道结果。谢谢你。

于 2013-07-29T20:38:15.570 回答
0

如果是您的 Windows PC,并且您正在使用cygwin运行 Hadoop。然后任务跟踪器将不起作用。

于 2013-07-29T07:58:41.753 回答