分享

求助:hadnoop完全分布式集群安装问题,数据产生不了

ran_newstar 发表于 2014-8-22 00:08:58 [显示全部楼层] 回帖奖励 阅读模式 关闭右栏 60 61393
ran_newstar 发表于 2014-8-22 15:00:33
本帖最后由 ran_newstar 于 2014-8-22 15:08 编辑
sstutu 发表于 2014-8-22 14:58
不是说你Linux基础,而是你hadoop基本的知识需要补充些,对配置项的配置文件也有所误解。

[hadoop@master ~]$ hadoop fs -put ./Public file:///home/hadoop/dfs/hadoop-2.4.0/data/
14/08/21 23:59:08 WARN conf.Configuration: mapred-site.xml:an attempt to override final parameter: mapreduce.job.end-notification.max.attempts;  Ignoring.
14/08/21 23:59:08 WARN conf.Configuration: mapred-site.xml:an attempt to override final parameter: mapreduce.job.end-notification.max.retry.interval;  Ignoring.
14/08/21 23:59:09 WARN conf.Configuration: mapred-site.xml:an attempt to override final parameter: mapreduce.job.end-notification.max.attempts;  Ignoring.
14/08/21 23:59:09 WARN conf.Configuration: mapred-site.xml:an attempt to override final parameter: mapreduce.job.end-notification.max.retry.interval;  Ignoring.
14/08/21 23:59:09 WARN conf.Configuration: mapred-site.xml:an attempt to override final parameter: mapreduce.job.end-notification.max.attempts;  Ignoring.
14/08/21 23:59:09 WARN conf.Configuration: mapred-site.xml:an attempt to override final parameter: mapreduce.job.end-notification.max.retry.interval;  Ignoring.
14/08/21 23:59:09 WARN conf.Configuration: mapred-site.xml:an attempt to override final parameter: mapreduce.job.end-notification.max.attempts;  Ignoring.
14/08/21 23:59:09 WARN conf.Configuration: mapred-site.xml:an attempt to override final parameter: mapreduce.job.end-notification.max.retry.interval;  Ignoring.
[hadoop@master ~]$ ls -l /home/hadoop/dfs/hadoop-2.4.0/data/
total 8
drwxrwxr-x. 2 hadoop hadoop 4096 Aug 21 23:57 Music
drwxrwxr-x. 2 hadoop hadoop 4096 Aug 21 23:59 Public

这只是试验了hadoop fs -put命令而已

回复

使用道具 举报

hyj 发表于 2014-8-22 16:10:06
你jps看一下进程有几个。这里显示的是put失败,详细的你看看日志,这样能精确定位错误的来源。
这里面最重要的是细心。
回复

使用道具 举报

hyj 发表于 2014-8-22 16:13:37
不熟悉的话,可以先写个简单的,如下面例子:
hadoop fs -put ./start-dfs.sh /
回复

使用道具 举报

hyj 发表于 2014-8-22 16:24:25
<property>
  <name>fs.defaultFS</name>
  <value>hdfs://master:9000</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>hdfs://master:9000</value>
  <description>Deprecated. Use (fs.defaultFS) property
  instead</description>
</property>


你的配置文件出错了,这两个不能并存,一个是hadoop2.x的,一个hadoop0.x

把配置项目给去掉fs.default.name
也就是下面内容:
  1. <property>
  2.   <name>fs.default.name</name>
  3.   <value>hdfs://master:9000</value>
  4.   <description>Deprecated. Use (fs.defaultFS) property
  5.   instead</description>
  6. </property>
复制代码











回复

使用道具 举报

ran_newstar 发表于 2014-8-22 16:31:20
本帖最后由 ran_newstar 于 2014-8-22 16:32 编辑
hyj 发表于 2014-8-22 16:24
fs.defaultFS
  hdfs://master:9000
  The name of the default file system.  A URI whose

女侠,这个属性配置文件里一直在的,我只是修改了value。
请问master上出现了DataNode进程,怎么通过修改配置文件去掉?安装文档里的master没有DataNode进程。
[hadoop@master sbin]$ jps
5554 NameNode
5955 ResourceManager
6237 Jps
3547 DataNode



回复

使用道具 举报

hyj 发表于 2014-8-22 16:32:06
hdfs-site.xml:
<property>
  <name>dfs.datanode.data.dir</name>
  <value>file:/home/hadoop/data/hadoop-2.4.0</value>
  <description>Determines where on the local filesystem an DFS data node
  should store its blocks.  If this is a comma-delimited
  list of directories, then data will be stored in all named
  directories, typically on different devices.
  Directories that do not exist are ignored.
  </description>
</property>



<property>
  <name>dfs.namenode.name.dir</name>
  <value>file:/home/hadoop/dfs/hadoop-2.4.0/name</value>
  <description>Determines where on the local filesystem the DFS name node
      should store the name table(fsimage).  If this is a comma-delimited list
      of directories then the name table is replicated in all of the
      directories, for redundancy. </description>
</property>


<property>
  <name>dfs.namenode.rpc-address</name>
  <value>master:9001</value>
  <description>
    RPC address that handles all clients requests. In the case of HA/Federation where multiple namenodes exist,
    the name service id is added to the name e.g. dfs.namenode.rpc-address.ns1
    dfs.namenode.rpc-address.EXAMPLENAMESERVICE
    The value of this property will take the form of nn-host1:rpc-port.
  </description>
</property>


上面红字部分的配置项你能说一下是什么意思吗?如果不是必须的,最好去掉

回复

使用道具 举报

hyj 发表于 2014-8-22 16:35:17
ran_newstar 发表于 2014-8-22 16:31
女侠,这个属性配置文件里一直在的,我只是修改了value。
请问master上出现了DataNode进程,怎么通过修 ...

你看一下conf文件夹里的 slaves文件,如果包含master的话,去掉它就可以了。
回复

使用道具 举报

ran_newstar 发表于 2014-8-22 16:37:15
hyj 发表于 2014-8-22 16:32
hdfs-site.xml:

  dfs.datanode.data.dir

这个在实际部署中应该是cluster机制的虚拟地址,如果只填master地址的话,那么机器死机的时候,应用就完蛋了。
回复

使用道具 举报

ran_newstar 发表于 2014-8-22 16:39:17
hyj 发表于 2014-8-22 16:35
你看一下conf文件夹里的 slaves文件,如果包含master的话,去掉它就可以了。

[hadoop@master sbin]$ cat ../etc/hadoop/slaves
data1
data2

[hadoop@master sbin]$ jps
5554 NameNode
6261 Jps
5955 ResourceManager
3547 DataNode

没有包含啊,怎么还有这个datanode进程?

回复

使用道具 举报

sstutu 发表于 2014-8-22 16:58:48
本帖最后由 sstutu 于 2014-8-22 17:00 编辑
ran_newstar 发表于 2014-8-22 16:39
[hadoop@master sbin]$ cat ../etc/hadoop/slaves
data1
data2

这个集群是你搭建的吗?问题多,但是却是采用的hadoop ha的形式。

伪分布才是master与slave同一个节点,如果完全分布,datanode的节点是slaves文件来配置的,所以你这个问题,不属于正常思维,这么奇怪的问题没有见过



回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

关闭

推荐上一条 /2 下一条