0
votes

For installing hadoop, I'm using this: http://blog.tundramonkey.com/2013/02/24/setting-up-hadoop-on-osx-mountain-lion

Got stuck at core-site.xml step. After suggested update, my core-site.xml file is:

<?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>

whose terminal run returns error:

line 1: syntax error near unexpected token newline' line 1:'

This error pops up in any *.xml file.

1
Looks like your core-site.xml files correct, Ensure entries in other site files like hdfs-site.xml, mapred-site.xml or yarn-site.xml are correct. - SachinJ

1 Answers

1
votes

create a directory and set the required ownerships and permissions:

$ 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

set your 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>