lundi 21 avril 2014

Hadoop - OLAP peut être fait dans BigTable ? -Débordement de pile


In the past I used to build WebAnalytics using OLAP cubes running on MySQL. Now an OLAP cube the way I used it is simply a large table (ok, it was stored a bit smarter than that) where each row is basically a measurement or and aggregated set of measurements. Each measurement has a bunch of dimensions (i.e. which pagename, useragent, ip, etc.) and a bunch of values (i.e. how many pageviews, how many visitors, etc.).


The queries that you run on a table like this are usually of the form (meta-SQL):


SELECT SUM(hits), SUM(bytes),
FROM MyCube
WHERE date='20090914' and pagename='Homepage' and browser!='googlebot'
GROUP BY hour

So you get the totals for each hour of the selected day with the mentioned filters. One snag was that these cubes usually meant a full table scan (various reasons) and this meant a practical limitation on the size (in MiB) you could make these things.


I'm currently learning the ins and outs of Hadoop and the likes.


Running the above query as a mapreduce on a BigTable looks easy enough: Simply make 'hour' the key, filter in the map and reduce by summing the values.


Can you run a query like I showed above (or at least with the same output) on a BigTable kind of system in 'real time' (i.e. via a user interface and the user get's their answer ASAP) instead of batch mode?


If not; what is the appropriate technology to do something like this in the realm of BigTable/Hadoop/HBase/Hive and the likes?




It's even kind of been done (kind of).


LastFm's aggregation/summary engine: http://github.com/zohmg/zohmg


A google search turned up a google code project "mroll" but it doesn't have anything except contact info (no code, nothing). Still, might want to reach out to that guy and see what's up. http://code.google.com/p/mroll/




My answer relates to HBase, but applies equally to BigTable.


Urban Airship outsourced datacube, which I think is close to what you want. See their presentation here.


Adobe also has a couple of presentations (here and here) on how they do "low-latency OLAP" with HBase.




If you are looking for a table-scan approach, have you considered Google BigQuery? BigQuery does automatic scale-out on the back-side that gives interactive response. There is a good session by Jordan Tigani from the 2012 Google I/O event that explains some of the internals.


http://www.youtube.com/watch?v=QI8623HlYd4


It's not MapReduce but it is geared towards high-speed table scan like what you described.




We managed to create low latency OLAP in HBase by preagragating a SQL query and mapping it into appropriate Hbase qualifiers. For more detail visit below site.


http://soumyajitswain.blogspot.in/2012/10/hbase-low-latency-olap.html




Andrei Dragomir made an interesting talk about how Adobe performs OLAP functionality with M/R and HBase.


Video: http://www.youtube.com/watch?v=5U3EnfiKs44


Slides: http://hstack.org/hbasecon-low-latency-olap-with-hbase/



In the past I used to build WebAnalytics using OLAP cubes running on MySQL. Now an OLAP cube the way I used it is simply a large table (ok, it was stored a bit smarter than that) where each row is basically a measurement or and aggregated set of measurements. Each measurement has a bunch of dimensions (i.e. which pagename, useragent, ip, etc.) and a bunch of values (i.e. how many pageviews, how many visitors, etc.).


The queries that you run on a table like this are usually of the form (meta-SQL):


SELECT SUM(hits), SUM(bytes),
FROM MyCube
WHERE date='20090914' and pagename='Homepage' and browser!='googlebot'
GROUP BY hour

So you get the totals for each hour of the selected day with the mentioned filters. One snag was that these cubes usually meant a full table scan (various reasons) and this meant a practical limitation on the size (in MiB) you could make these things.


I'm currently learning the ins and outs of Hadoop and the likes.


Running the above query as a mapreduce on a BigTable looks easy enough: Simply make 'hour' the key, filter in the map and reduce by summing the values.


Can you run a query like I showed above (or at least with the same output) on a BigTable kind of system in 'real time' (i.e. via a user interface and the user get's their answer ASAP) instead of batch mode?


If not; what is the appropriate technology to do something like this in the realm of BigTable/Hadoop/HBase/Hive and the likes?



It's even kind of been done (kind of).


LastFm's aggregation/summary engine: http://github.com/zohmg/zohmg


A google search turned up a google code project "mroll" but it doesn't have anything except contact info (no code, nothing). Still, might want to reach out to that guy and see what's up. http://code.google.com/p/mroll/



My answer relates to HBase, but applies equally to BigTable.


Urban Airship outsourced datacube, which I think is close to what you want. See their presentation here.


Adobe also has a couple of presentations (here and here) on how they do "low-latency OLAP" with HBase.



If you are looking for a table-scan approach, have you considered Google BigQuery? BigQuery does automatic scale-out on the back-side that gives interactive response. There is a good session by Jordan Tigani from the 2012 Google I/O event that explains some of the internals.


http://www.youtube.com/watch?v=QI8623HlYd4


It's not MapReduce but it is geared towards high-speed table scan like what you described.



We managed to create low latency OLAP in HBase by preagragating a SQL query and mapping it into appropriate Hbase qualifiers. For more detail visit below site.


http://soumyajitswain.blogspot.in/2012/10/hbase-low-latency-olap.html



Andrei Dragomir made an interesting talk about how Adobe performs OLAP functionality with M/R and HBase.


Video: http://www.youtube.com/watch?v=5U3EnfiKs44


Slides: http://hstack.org/hbasecon-low-latency-olap-with-hbase/


0 commentaires:

Enregistrer un commentaire