Dear all,

I am a new user of HDFS. The default Data/Name directory is /tmp. I would
like to change it. The hdfs-site.xml is updated as follows.

  <property>
    <name>dfs.replication</name>
    <value>1</value>
    <description>The actual number of replications can be specified when
the file is created.</description>
  </property>
  <property>
    <name>hadoop.tmp.dir</name>
    <value>/home/bing/GreatFreeLabs/Hadoop/FS</value>
  </property>
  <property>
    <name>dfs.name.dir</name>
    <value>${hadoop.tmp.dir}/dfs/name/</value>
  </property>
  <property>
    <name>dfs.data.dir</name>
    <value>${hadoop.tmp.dir}/dfs/data/</value>
  </property>

But when formatting by running the following command, I was asked to format
the /tmp. Why?

   $ hadoop namenode -format
   Re-format filesystem in /tmp/hadoop-libing/dfs/name ? (Y or N) N

Because the updated name node is not formatted, the name node cannot be
started.

How to solve the problem? Thanks so much!

Best regards,
Bing

Reply via email to