<p>I'm interested in finding out how the recently-released (<a href="http://mirror.facebook.com/facebook/hive/hadoop-0.17/" rel="noreferrer">http://mirror.facebook.com/facebook/hive/hadoop-0.17/</a>) Hive compares to HBase in terms of performance. The SQL-like interface used by Hive is very much preferable to the HBase API we have implemented.</p>

[{'answer_id': 36398, 'author': 'Chris Bunch', 'author_id': 422, 'author_profile': 'https://Stackoverflow.com/users/422', 'pm_score': 7, 'selected': True, 'text': '<p>It\'s hard to find much about Hive, but I found this <a href="http://wiki.apache.org/hadoop/Hive" rel="noreferrer">snippet</a> on the Hive site that leans heavily in favor of HBase (bold added):</p>\n\n<p>Hive is based on Hadoop which is a batch processing system. Accordingly, this system does not and <strong>cannot promise low latencies on queries</strong>. The paradigm here is strictly of submitting jobs and being notified when the jobs are completed as opposed to real time queries. As a result it should not be compared with systems like Oracle where analysis is done on a significantly smaller amount of data but the analysis proceeds much more iteratively with the response times between iterations being less than a few minutes. <strong>For Hive queries response times for even the smallest jobs can be of the order of 5-10 minutes and for larger jobs this may even run into hours.</strong></p>\n\n<p>Since HBase and HyperTable are all about performance (being modeled on Google\'s BigTable), they sound like they would certainly be much faster than Hive, at the cost of functionality and a higher learning curve (e.g., they don\'t have joins or the SQL-like syntax).</p>\n'}, {'answer_id': 1046386, 'author': 'Tim', 'author_id': 128876, 'author_profile': 'https://Stackoverflow.com/users/128876', 'pm_score': 3, 'selected': False, 'text': "<p>Hive is an analytics tool. Just like pig, it was designed for ad hoc batch processing of potentially enourmous amounts of data by leveraging map reduce. Think terrabytes. Imagine trying to do that in a relational database...</p>\n\n<p>HBase is a column based key value store based on BigTable. You can't do queries per se, though you can run map reduce jobs over HBase. It's primary use case is fetching rows by key, or scanning ranges of rows. A major feature is being able to have data locality when scanning across ranges of row keys for a 'family' of columns.</p>\n"}, {'answer_id': 2971553, 'author': 'Jeff Hammerbacher', 'author_id': 171965, 'author_profile': 'https://Stackoverflow.com/users/171965', 'pm_score': 4, 'selected': False, 'text': '<p>From one perspective, Hive consists of five main components: a SQL-like grammar and parser, a query planner, a query execution engine, a metadata repository, and a columnar storage layout. Its primary focus is data warehouse-style analytical workloads, so low latency retrieval of values by key is not necessary.</p>\n\n<p>HBase has its own metadata repository and columnar storage layout. It is possible to author HiveQL queries over HBase tables, allowing HBase to take advantage of Hive\'s grammar and parser, query planner, and query execution engine. See <a href="http://wiki.apache.org/hadoop/Hive/HBaseIntegration" rel="noreferrer">http://wiki.apache.org/hadoop/Hive/HBaseIntegration</a> for more details.</p>\n'}, {'answer_id': 2983181, 'author': 'haijin', 'author_id': 359535, 'author_profile': 'https://Stackoverflow.com/users/359535', 'pm_score': 3, 'selected': False, 'text': '<p>To my humble knowledge, Hive is more comparable to Pig.  Hive is SQL-like and Pig is script based.\nHive seems to be more complicated with query optimization and execution engines as well as requires end user needs to specify schema parameters(partition etc).\nBoth are intend to process text files, or sequenceFiles.</p>\n\n<p>HBase is for key value data store and retrieve...you can scan or filter on those key value pairs(rows). You can not do queries on (key,value) rows.</p>\n'}, {'answer_id': 14699935, 'author': 'Shawn H', 'author_id': 614211, 'author_profile': 'https://Stackoverflow.com/users/614211', 'pm_score': 2, 'selected': False, 'text': '<p>As of the most recent Hive releases, a lot has changed that requires a small update as <a href="https://cwiki.apache.org/confluence/display/Hive/HBaseIntegration" rel="nofollow">Hive and HBase are now integrated</a>.  What this means is that Hive can be used as a query layer to an HBase datastore.  Now if people are looking for alternative HBase interfaces, Pig also offers a really nice way of <a href="http://pig.apache.org/docs/r0.9.1/api/org/apache/pig/backend/hadoop/hbase/HBaseStorage.html" rel="nofollow">loading and storing HBase data</a>.  Additionally, it looks like <a href="http://blog.cloudera.com/blog/2012/10/cloudera-impala-real-time-queries-in-apache-hadoop-for-real/" rel="nofollow">Cloudera Impala</a> may offer substantial performance Hive based queries on top of HBase.  They are claim up to 45x faster queries over traditional Hive setups.  </p>\n'}, {'answer_id': 30162708, 'author': 'sras', 'author_id': 4324632, 'author_profile': 'https://Stackoverflow.com/users/4324632', 'pm_score': 0, 'selected': False, 'text': "<p>To compare Hive with Hbase, I'd like to recall the definition below:</p>\n\n<blockquote>\n  <p>A database designed to handle transactions isn’t designed to handle\n  analytics. It isn’t structured to do analytics well. A data warehouse,\n  on the other hand, is structured to make analytics fast and easy.</p>\n</blockquote>\n\n<p><strong>Hive is a data warehouse infrastructure built on top of Hadoop which is suitable for long running ETL jobs.\nHbase is a database designed to handle real time transactions</strong></p>\n"}, {'answer_id': 35415326, 'author': 'Ravindra babu', 'author_id': 4999394, 'author_profile': 'https://Stackoverflow.com/users/4999394', 'pm_score': 2, 'selected': False, 'text': '<p><strong>Hive and HBase are used for different <a href="https://www.xplenty.com/blog/2014/05/hive-vs-hbase/" rel="nofollow noreferrer">purpose</a>.</strong> </p>\n\n<p><strong><em>Hive:</em></strong></p>\n\n<p><strong>Pros:</strong></p>\n\n<ol>\n<li><strong>Apache Hive</strong> is a <em>data warehouse infrastructure</em> built on top of <em>Hadoop</em>.</li>\n<li>It allows for querying data stored on <strong>HDFS</strong> for analysis via <strong>HQL</strong>, an <em>SQL-like language</em>, which will be converted into series of <em>Map Reduce Jobs</em></li>\n<li>It only runs <em>batch processes</em> on Hadoop.</li>\n<li>it’s <em>JDBC compliant</em>, it also integrates with existing SQL based tools</li>\n<li>Hive supports <em>partitions</em></li>\n<li>It supports <em>analytical querying of data</em> collected over a period of time </li>\n</ol>\n\n<p><strong>Cons:</strong></p>\n\n<ol>\n<li>It does not currently support update statements</li>\n<li>It should be provided with a predefined schema to map files and directories into columns</li>\n</ol>\n\n<p><strong><em>HBase:</em></strong></p>\n\n<p><strong>Pros:</strong></p>\n\n<ol>\n<li>A scalable, <em>distributed database</em> that supports structured data storage for large tables</li>\n<li>It provides <em>random, real time read/write access</em> to your Big Data. HBase operations run in real-time on its database rather than MapReduce jobs</li>\n<li>it supports <em>partitions</em> to tables, and tables are further split into column families</li>\n<li><em>Scales horizontally</em> with huge amount of data  by using Hadoop </li>\n<li>Provides  key based access to data when storing or retrieving. It <em>supports add or update</em> rows.</li>\n<li>Supports <em>versoning</em> of data.</li>\n</ol>\n\n<p><strong>Cons:</strong></p>\n\n<ol>\n<li>HBase queries are written in a custom language that needs to be learned</li>\n<li>HBase isn’t fully ACID compliant</li>\n<li>It can\'t be used with complicated access patterns (such as joins)</li>\n<li>It is also not a complete substitute for HDFS when doing large batch MapReduce</li>\n</ol>\n\n<p><strong>Summary:</strong></p>\n\n<p><strong><em>Hive can be used for analytical queries while HBase for real-time querying. Data can even be read and written from Hive to HBase and back again.</em></strong></p>\n'}]
['https://Stackoverflow.com/questions/24179', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/2588/']