在linux 64位计算机上安装hadoop-2.2.0时出现问题

在linux 64位计算机上安装hadoop-2.2.0时出现问题,hadoop,hadoop-streaming,hadoop2,hadoop-plugins,hadoop-partitioning,Hadoop,Hadoop Streaming,Hadoop2,Hadoop Plugins,Hadoop Partitioning,使用此链接,尝试在ubuntu 12.04(64位机器)中安装Hadoop版本-2.2.0(单节点群集) 使用以下命令通过namenode格式化hdfs文件系统时 hadoop namenode -format 当我这样做的时候,得到以下问题 14/08/07 10:38:39致命的namenode.namenode:namenode联接中出现异常 java.lang.RuntimeException:org.xml.sax.SAXParseException;systemId:file:/

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

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

hadoop namenode -format
当我这样做的时候,得到以下问题


14/08/07 10:38:39致命的namenode.namenode:namenode联接中出现异常 java.lang.RuntimeException:org.xml.sax.SAXParseException;systemId:file:/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>

mapreduce.framework.name
纱线

14/08/07 10:38:39致命的namenode.namenode:namenode中的异常join java.lang.RuntimeException:org.xml.sax.SAXParseException;systemId:file:/usr/local/hadoop/etc/hadoop/mapred-site.xml行号:27;列数:1尾随部分不允许包含内容


可能是XML中忘记删除的某个字符。请发布完整的XML。就像阿披实所说的

mapred-site.xml中还有其他内容吗?我看不到任何第27行。现在复制了整个内容。检查它,我看不到第27行。若您在最后一行之后留下[enter]键,可能是导致问题的原因。请尝试从@Abhishek所说的实现,到目前为止,所有内容都暗示XML的第27行存在问题,但不幸的是,我们在您的帖子中并没有看到第27行。您可以尝试查看文件的十六进制表示形式(对文件运行类似于
hextump
xxd
)。这可以告诉您XML结尾是否有奇怪的地方,比如控制字符。是的,这是一个问题…修复了它…感谢您的帮助