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.
2
solved Can’t copy file into HDFS