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.