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

来源:2-3 Hadoop安装-配置hadoop

慕UI33210

2017-07-01 17:46

[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回答

  • weibo_我要变得么么哒_03191471
    2019-03-02 11:01:24

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

  • alwynxu
    2017-07-09 11:08:44

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

    兼传尺素

    具体怎么做?

    2017-09-05 15:02:27

    共 1 条回复 >

认识Hadoop--基础篇

Hadoop入门视频教程,大数据人才的入门首选

138835 学习 · 348 问题

查看课程

相似问题