1 / 20

大数据对数据仓库性能的四个要求

RCFile A Fast and Space-efficient Data Placement Structure in MapReduce-based Warehouse Systems (ICDE 2011). 大数据对数据仓库性能的四个要求. Fast data loading Fast query processing Highly efficient storage space utilization Strong adaptivity to highly dynamic workload patterns. “存储空间的高效利用”的思考.

Download Presentation

大数据对数据仓库性能的四个要求

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. RCFile A Fast and Space-efficient Data Placement Structure in MapReduce-based Warehouse Systems (ICDE 2011)

  2. 大数据对数据仓库性能的四个要求 • Fast data loading • Fast query processing • Highly efficient storage space utilization • Strong adaptivity to highly dynamic workload patterns

  3. “存储空间的高效利用”的思考 是否应该牺牲磁盘来提高I/O读取,难道磁盘的存储空间就不重要么? RCFile可以扩展到分级的HDFS中,更 加高效的利用存储空间,提高读取效率

  4. three traditional data placement structure for MapReduce

  5. 列存储 列组存储

  6. RCFile(Record Columnar File)存储结构遵循的是“先水平划分,再垂直划分”的数据库分片的设计理念,这个想法来源于PAX。 它结合了行存储和列存储的优点: 首先,RCFile保证同一行的数据位于同一节点,因此元组重构的开销很低; 其次,像列存储一样,RCFile能够利用列维度的数据压缩,并且能跳过不必要的列读取。

  7. core technology 实质是技术重组 • data layout and compression • data appending---------fit SSD • data reads and lazy decompression • row group size---------key

  8. data layout and compression 1) According to the HDFS structure, a table can havemultiple HDFS blocks. 2) In each HDFS block, RCFile organizes records withthe basic unit of a row group. 也就是说,存储在一个HDFS块中的所有记录被划分为多个行组。对于一张表,所有行组大小都相同。一个HDFS块会有一个或多个行组。

  9. 3) A row group contains three sections 第一部分是行组头部的同步标识,主要用于分隔HDFS块中的两个连续行组; 第二部分是行组的元数据头部,用于存储行组单元的信息,包括行组中的记录数、每个列的字节数、列中每个域的字节数; 第三部分是表格数据段,即实际的列存储数据。在该部分中,同一列的所有域顺序存储。

  10. how data is compressed in RCFile? a) First, for the whole metadata header section, RCFile uses the RLE (Run Length Encoding) algorithm to compress data. b) Second, the table data section is not compressed as a whole unit. Rather, each column is independently compressed with the Gzip compression algorithm. 将来的工作:使用不同算法来压缩不同列(根据某一数据类型和数据分布来适应选择最好的压缩算法)。

  11. data appending 1) RCFile为每列创建并维护一个内存column holder,当记录追加时,所有域被分发,每个域追加到其对应的column holder。此外,RCFile在元数据头部中记录每个域对应的元数据。 2) RCFile提供两个参数来控制在刷写到磁盘之前,内存中缓存多少个记录。一个参数是记录数的限制,另一个是内存缓存的大小限制。 3) RCFile首先压缩元数据头部并写到磁盘,然后分别压缩每个column holder,并将压缩后的column holder刷写到底层文件系统中的一个行组中。

  12. data reads and lazy decompression 表tbl(c1, c2, c3, c4) SELECT c1 FROM tbl WHERE c4 = 1

  13. row group size 大行组会损害数据的读性能,减少lazy解压带来的性能提升;占用更多的内存,影响MapReduce并发作业

  14. The relationship between row group size & lazy decompression: “SELECT a,b,c,d FROM tbl WHERE e = 1” 我们假设一个HDFS数据块中,只有一个记录满足查询条件。考虑一个极端的情况,行组尽可能的大,这样HDFS数据块中只包含一个行组。

  15. THEAPIOFRCFILE 1) MapReduce的输入和输出 InputFormat OutputFormat RecordReader 2) Hive方式的直接存储(读取) RCFile.Reader RCFile.Writer

  16. Performance Evaluation

  17. 总结与思考 基于MapReduce的数据仓库中,大数据分析对于数据存储结构的设计和实现有四个特殊的要求 已经被广泛应用在Facebook、Howl等很多领域 关系型数据库能表达很多Nosql表达不了的复杂关系, 可否迁移至SSD上的改进HDFS? 又或者针对RCFile的思想,做更多扩展? thx

More Related