【问题标题】:Issue while installing hadoop-2.2.0 in linux 64 bit machine在 linux 64 位机器上安装 hadoop-2.2.0 时出现问题
【发布时间】:2014-08-07 05:23:42
【问题描述】:

使用此链接,尝试在 ubuntu 12.04(64 位机器)中安装 Hadoop 版本 - 2.2.0(单节点集群)

http://bigdatahandler.com/hadoop-hdfs/installing-single-node-hadoop-2-2-0-on-ubuntu/

使用以下命令通过 namenode 格式化 hdfs 文件系统时

hadoop namenode -format

当我这样做时,得到以下问题,

14/08/07 10:38:39 FATAL namenode.NameNode:namenode 加入异常 java.lang.RuntimeException: org.xml.sax.SAXParseException; systemId:文件:/usr/local/hadoop/etc/hadoop/mapred-site.xml;行号:27;列号:1;结尾部分不允许有内容。

我需要做什么才能解决以下问题?

Mapred-site.xml:

<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
<!--
  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License. See accompanying LICENSE file.
-->

<!-- Put site-specific property overrides in this file. -->

<configuration>

<property>
<name>mapreduce.framework.name</name>
<value>yarn</value>
</property>

</configuration>

【问题讨论】:

  • mapred-site.xml 中还有其他内容吗?我看不到任何第 27 行。
  • 现在复制了整个东西看看
  • 仍然看不到第 27 行。如果您在最后一行之后留下了 [enter] 键,可能是它引起的问题。
  • 尝试从this实现
  • 就像@Abhishek 所说,到目前为止,一切都暗示了 XML 第 27 行存在问题,但不幸的是,我们在您的帖子中没有看到第 27 行。您可以尝试查看文件的十六进制表示形式(在文件上运行 hexdumpxxd 之类的内容)。这可以告诉您 XML 的末尾是否有一些奇怪的东西,比如控制字符。

标签: hadoop hadoop-streaming hadoop2 hadoop-plugins hadoop-partitioning


【解决方案1】:

14/08/07 10:38:39 致命的 namenode.NameNode:namenode 中的异常加入 java.lang.RuntimeException:org.xml.sax.SAXParseException; systemId:文件:/usr/local/hadoop/etc/hadoop/mapred-site.xml; 行号:27; columnNumber: 1; 结尾部分不允许有内容

您的 XML 中可能有一些您忘记删除的字符。请发布您的完整 XML。就像@Abhishek 说的!

【讨论】:

  • 你这是个问题...已解决...感谢您的帮助
猜你喜欢
  • 1970-01-01
  • 2021-06-11
  • 2018-11-06
  • 2010-12-07
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2015-09-29
  • 2017-09-19
相关资源
最近更新 更多