Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st.
We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here.
Need help or have questions? Drop us a line at [email protected]
Created 02-19-2016 06:26 AM
Hi,
Can anyone explains me how indexing is done in HDFS?
Created 02-19-2016 09:38 AM
Hello Rukishek,
unless I misunderstand something this is not correct. HDFS doesn't store in the data where the next block is. Instead the Namenode knows which blocks make up a file and also the order of the blocks. Using this the HDFS client knows which block to load at any time if you seek in the file.
HDFS blocks are stupid, simple 128MB cut blocks of the data. Datanodes are stupid and only know which blocks they have. The Namenode pieces it all together using an in-memory image of all files and blocks that make these files and where they are stored. The clients get this information from the namenode.
Now if you mean full-text indexing then you should look at Solr like Rahul said.
Created 02-19-2016 06:37 AM
Created 02-19-2016 06:42 AM
I got below answer:
Hadoop has its own way of indexing. Depending upon the block size, once the data is stored, HDFS will keep on storing the last part of the data which will say where the next part of the data will be. In fact, this is the base of HDFS.
-
Is this answer correct?
Created 02-19-2016 11:31 AM
@Rushikesh Deshmukh Look at @Benjamin Leonhardi answer.
No, it's not correct.
Created 02-19-2016 09:38 AM
Hello Rukishek,
unless I misunderstand something this is not correct. HDFS doesn't store in the data where the next block is. Instead the Namenode knows which blocks make up a file and also the order of the blocks. Using this the HDFS client knows which block to load at any time if you seek in the file.
HDFS blocks are stupid, simple 128MB cut blocks of the data. Datanodes are stupid and only know which blocks they have. The Namenode pieces it all together using an in-memory image of all files and blocks that make these files and where they are stored. The clients get this information from the namenode.
Now if you mean full-text indexing then you should look at Solr like Rahul said.