gpt4 book ai didi

xml - 如何在 ubuntu 14.04 中使用 Apache spark 解决以下 fatal error ?

转载 作者:可可西里 更新时间:2023-11-01 16:30:45 26 4
gpt4 key购买 nike

我在运行 hadoop namenode -format 时得到的错误消息:

[Fatal Error] core-site.xml:8:5: The element type "property" must be terminated by the matching end-tag "</property>".
15/11/12 14:53:07 FATAL conf.Configuration: error parsing conf file: org.xml.sax.SAXParseException; systemId: file:/home/administrator/Downloads/FlareGet/Compressed/hadoop/conf/core-site.xml; lineNumber: 8; columnNumber: 5; The element type "property" must be terminated by the matching end-tag "</property>".
15/11/12 14:53:07 ERROR namenode.NameNode: java.lang.RuntimeException: org.xml.sax.SAXParseException; systemId: file:/home/administrator/Downloads/FlareGet/Compressed/hadoop/conf/core-site.xml; lineNumber: 8; columnNumber: 5; The element type "property" must be terminated by the matching end-tag "</property>".
at org.apache.hadoop.conf.Configuration.loadResource(Configuration.java:1237)
at org.apache.hadoop.conf.Configuration.loadResources(Configuration.java:1093)
at org.apache.hadoop.conf.Configuration.getProps(Configuration.java:1037)
at org.apache.hadoop.conf.Configuration.set(Configuration.java:438)
at org.apache.hadoop.hdfs.server.namenode.NameNode.setStartupOption(NameNode.java:1250)
at org.apache.hadoop.hdfs.server.namenode.NameNode.createNameNode(NameNode.java:1267)
at org.apache.hadoop.hdfs.server.namenode.NameNode.main(NameNode.java:1288)
Caused by: org.xml.sax.SAXParseException; systemId: file:/home/administrator/Downloads/FlareGet/Compressed/hadoop/conf/core-site.xml; lineNumber: 8; columnNumber: 5; The element type "property" must be terminated by the matching end-tag "</property>".
at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:257)
at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:338)
at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:177)
at org.apache.hadoop.conf.Configuration.loadResource(Configuration.java:1142)
... 6 more

15/11/12 14:53:07 INFO namenode.NameNode: SHUTDOWN_MSG:
/************************************************************
SHUTDOWN_MSG: Shutting down NameNode at Lenovo-G580/127.0.1.1
************************************************************/

我在 core-site.xml 中的代码:

<?xml version="1.0"?>
<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://localhost: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>

所有标签都已正确结束。但是错误仍然显示,我无法弄清楚。请帮助。

最佳答案

您的 XML 在第一个属性处有问题:标记名称关闭了两次,但从未打开过。应该是:

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

关于xml - 如何在 ubuntu 14.04 中使用 Apache spark 解决以下 fatal error ?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33668158/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com