Hadoop单节点安装

时间:2014-05-10 17:46:11

标签: hadoop

我在ubuntu 12.04 LTS上安装了hadoop单节点(版本1.0.3)。问题是每当我启动节点时,jobtracker状态仍然停滞为“INTIIALIZING”,并且在执行jps约5-6次后,Datanode进程也会消失。我试图查看日志文件,我设法找到了这个错误:

INFO org.apache.hadoop.ipc.Client: Retrying connect to server: localhost/127.0.0.1:54310

有时一切正常,而另一方面,有时数据节点根本无法启动。任何人都可以建议为什么会出现这种不一致的情况?

相关文件如下:

芯-site.xml中

<configuration>
<property>
  <name>hadoop.tmp.dir</name>
  <value>/app/hadoop/tmp</value>
  <description>A base for other temporary directories.</description>
</property>

<property>
  <name>fs.default.name</name>
  <value>hdfs://127.0.0.1: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>
</configuration>

mapred-site.xml中

<configuration>
<property>
  <name>mapred.job.tracker</name>
  <value>127.0.0.1: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>
</configuration>

HDFS-site.xml中

<configuration>
<property>
  <name>dfs.replication</name>
  <value>1</value>
  <description>Default block replication.
  The actual number of replications can be specified when the file is created.
  The default is used if replication is not specified in create time.
  </description>
</property>
</configuration>

2 个答案:

答案 0 :(得分:0)

您可以检查一下namenode正在运行,或者如果它没有运行,您需要运行一次。 它需要在/ app中创建dir它需要权限。 输入以下命令:

sudo mkdir / app

sudo chown $ USER / app

hadoop namenode -format

然后启动所有节点并在几分钟后检查。它将运行所有节点..................

答案 1 :(得分:0)

您可以在http://www.improgrammer.net/hbase-installation-ubuntu/

看到tuotrial

udo mkdir / app

sudo chown $ USER / app

hadoop namenode -format