Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
456 views
in Technique[技术] by (71.8m points)

hadoop - Can't copy file into HDFS

I have problem with HDSF.

I can't copy any files into it, but I have ample space in DataNodes? Maybe I have some bad configuration?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

You should provide specific details like the exception you get, steps you follow etc, Since you have not specified any information at all, i would say check for the config files to make sure you have all the required entries in corresponding files :

In core-site.xml you should have

<configuration>
   <property>
    <name>fs.default.name</name>
    <value>hdfs://ipaddress:port</value>
  </property>
<property>
  <name>hadoop.tmp.dir</name>
  <value>/home/$user/hdfs/tmp</value>
  <description>A base for other temporary directories.</description>
</property>
</configuration>

Similarly hdfs-site.xml should have

<configuration>
<property>
    <name>dfs.replication</name>
    <value>1</value>
</property>
<property>
    <name>dfs.data.dir</name>

    <value>/home/$user/hdfs/data</value>
  </property>
<property>
    <name>dfs.name.dir</name>

    <value>/home/$user/hdfs/name</value>
  </property>
</configuration>

And finally the mapred-site.xml should have

<configuration>
 <property>
    <name>mapred.job.tracker</name>
    <value>ip:port</value>
  </property>
</configuration>

Hope this helps.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...