保存hadoop 配置文件報(bào)錯(cuò)如下,該怎么解決
[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 文件內(nèi)容如下:
<?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>
2019-03-02
xml的修改生效方式是重啟服務(wù)而不是source(或 .)
2017-07-09
權(quán)限不夠,如果使用的ubuntu可以使用sudo vim 來修改