apache - Hadoop filesystem copy - namenode vs datanode -
i need copy file filesystem hdfs, , below configuration in hdfs-site.xml. how should use "hadooop fs" command copy file @ /home/text.txt hdfs? should copy namenode or datanode?
<configuration> <property> <name>dfs.replication</name> <value>1</value> </property> <property> <name>dfs.namenode.name.dir</name> <value>file:/usr/local/hadoop_store/hdfs/namenode</value> </property> <property> <name>dfs.datanode.data.dir</name> <value>file:/usr/local/hadoop_store/hdfs/datanode</value> </property> </configuration>
what hadoop version use? directory dfs.namenode.name.dir
used storage meta data, , directory dfs.datanode.data.dir
used storage real data(e.g. user data).
if want upload file hdfs, need not care copy namenode or datanode. because hdfs it. , data storage on datanode.
you can use commond bin/hadoop fs -mkdir /input
, bin/hadoop fs copyfromlocal /home/text.txt /input
. first commond create directory "input" on hdfs, , second copy file hdfs.
Comments
Post a Comment