Thursday, November 18, 2010

How can HBase be low-latency if Hadoop is high-latency?

Hadoop is optimized for streaming large amounts of data and processing the data as a stream. Hadoop doesn't require a set data structure, the structure may be imposed at read time. That said, there are helper classes that allow you to write in various record-oriented formats.

Hadoop is said to be high-latency because when you run a MapReduce job, there's a bit of overhead for the job to start up and run. It is also optimized for volume--it is fast when you want to load a huge amount of data from disk, albeit not instantaneously. Not to mention, if you want to read a specific record, you will have to scan through potentially the entire data set to get your result.

HBase lives on top of Hadoop and reads/writes records in a custom format. HBase is a column-oriented Key/Value store, where keys are sorted in a b-tree for fast retrieval. HBase allows for low-latency random reads and writes, and it achieves this largely by caching data operations in memory.



(source: http://getsatisfaction.com/cloudera/topics/difference_between_hbase_and_hadoop_structure_i_e_both_denormalized_already)

No comments: