cuboid id + 具体的维度值
(最新的Rowkey中为了并发查询还加入了ShardKey,是最新的吗),cuboid为8位KeyValue
格式生成HBase的HFile,最后将HFile load进cube对应的HBase表中。1 select year, sum(price) 2 from table 3 where city = "beijing" 4 group by year
这个SQL涉及维度year
和city
,所以其对应的cuboid是00000011,又因为city的值是确定的beijing
,所以在Scan HBase时就会Scan Rowkey以00000011开头且city的值是beijing
的行,取到对应指标sum(price)
的值,返回给用户。
原文:https://www.cnblogs.com/dretrtg/p/13170556.html