gpt4 book ai didi

java - 在 mac os 上配置 hadoop namenode 时出现 yarn-site.xml 错误

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

我正在尝试将我的 mac 配置为 hadoop 名称节点。输入此命令后:

bin/hdfs namenode -format

我收到这个错误:

[Fatal Error] yarn-site.xml:3:4: Comment must start with "<!--".
15/12/28 20:32:06 FATAL conf.Configuration: error parsing conf yarn-site.xml
org.xml.sax.SAXParseException; systemId: file:/Library/hadoop-2.7.1/etc/hadoop/yarn-site.xml;
lineNumber: 3; columnNumber: 4; Comment must start with "<!--".

但是 yarn-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>yarn.nodemanager.aux-services</name>
<value>mapreduce_shuffle</value>
</property>
</configuration>

任何建议将不胜感激。

最佳答案

这里有个小错误:

<!-—

这应该是(注意第二个“-”。您需要将“—”替换为“-”):

<!--

所以更正后的文档是(我使用 XMLValidator 对其进行了验证:http://www.xmlvalidation.com/)

<?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>yarn.nodemanager.aux-services</name>
<value>mapreduce_shuffle</value>
</property>
</configuration>

关于java - 在 mac os 上配置 hadoop namenode 时出现 yarn-site.xml 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34504140/

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