为了账号安全,请及时绑定邮箱和手机立即绑定

保存hadoop 配置文件报错如下,该怎么解决

[root@localhost conf]# source hdfs-site.xml 

-bash: hdfs-site.xml: line 1: syntax error near unexpected token `newline'

-bash: hdfs-site.xml: line 1: `<?xml version="1.0"?>'

[root@localhost conf]# 


hdfs-site.xml 文件内容如下:

<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>


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


<configuration>

<property>

<name>dfs.data.dir</name>

<value>/hadoop/data</value>

</property>

</configuration>


正在回答

2 回答

xml的修改生效方式是重启服务而不是source(或 .)

0 回复 有任何疑惑可以回复我~

权限不够,如果使用的ubuntu可以使用sudo vim 来修改

0 回复 有任何疑惑可以回复我~
#1

兼传尺素

具体怎么做?
2017-09-05 回复 有任何疑惑可以回复我~

举报

0/150
提交
取消

保存hadoop 配置文件报错如下,该怎么解决

我要回答 关注问题
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号