gpt4 book ai didi

xml - hadoop core-site.xml语法错误

转载 作者:行者123 更新时间:2023-12-02 20:04:14 25 4
gpt4 key购买 nike

为了安装hadoop,我使用的是:
http://blog.tundramonkey.com/2013/02/24/setting-up-hadoop-on-osx-mountain-lion

卡在core-site.xml步骤中。建议更新后,我的core-site.xml文件为:

<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
<configuration>
<property>
<name>fs.default.name</name>
<value>hdfs://localhost:9000</value>
</property>
<property>
<name>hadoop.tmp.dir</name>
<value>/tmp/hadoop-${user.name}</value>
<description>A base for other temporary directories.</description>
</property>
</configuration>

其终端运行返回错误:

第1行:意外 token newline'
line 1:
'附近的语法错误

该错误会在任何* .xml文件中弹出。

最佳答案

创建目录并设置所需的所有权和权限:

$ sudo mkdir -p /app/hadoop/tmp
$ sudo chown hduser:hadoop /app/hadoop/tmp
# ...and if you want to tighten up security, chmod from 755 to 750...
$ sudo chmod 750 /app/hadoop/tmp

设置你的 core-site.xml:
<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>
</property>

关于xml - hadoop core-site.xml语法错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27746277/

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