Domanda

In context of HDFS, we have Namenode and Datanode, what does it mean to say that Namenode stored the file system namespace?

Also, is the directory we specify for datanode (in hdfs-core.xml) the only place where we can store the data, or we can specify any other directory to hold the data?

È stato utile?

Soluzione

It means that the NameNode inserts the file name into the file system tree and allocates a data block for it. This actually happens when you are trying to put the data into HDFS.

Yes it is possible to have any number of data directories. Here is what you have to set in hdfs-site.xml in the conf folder.

<property>   
    <name>dfs.data.dir</name>
    <value>path to data dir 1,path to data dir 2 etc</value> 
</property>
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top