py pyro a spa patial tempo mporal big data storage system
play

Py Pyro: A Spa patial-Tempo mporal Big-Data Storage System m - PowerPoint PPT Presentation

Py Pyro: A Spa patial-Tempo mporal Big-Data Storage System m Shen Li Shaohan Hu Raghu Ganti Mudhakar Srivatsa Tarek Abdelzaher 1 Applications A huge amount of geo-tagged events are generated


  1. Py Pyro: A Spa patial-Tempo mporal Big-Data Storage System m Shen Li Shaohan Hu Raghu Ganti Mudhakar Srivatsa Tarek Abdelzaher 1 ¡

  2. Applications • A ¡huge ¡amount ¡of ¡geo-­‑tagged ¡ events ¡are ¡generated ¡and ¡stored ¡ in ¡real-­‑5me. ¡ ‒ Tweets, ¡Photos ¡ ‒ Taxi ¡loca5ons ¡ ‒ Smartphone ¡User ¡Traces ¡ • Query ¡ask ¡for ¡events ¡within ¡a ¡ given ¡5me ¡range ¡and ¡geographic ¡ ¡ area: ¡geometry ¡query. ¡ ¡ ¡ Challenges • Efficiently ¡store ¡and ¡retrieve ¡ Spa5al-­‑temporal ¡data ¡ • Achieve ¡Scalability ¡ • Handle ¡dynamic ¡workload ¡hotspot ¡ 2 ¡

  3. Prior Approaches Global ¡Index ¡ • Make ¡Geographic ¡Informa5on ¡ Systems ¡(GIS) ¡scalable ¡ Subspace ¡ ¡ Subspace ¡ ¡ Subspace ¡ ¡ • Make ¡Big-­‑Data ¡storage ¡system ¡ Local ¡GIS ¡ Local ¡GIS ¡ Local ¡GIS ¡ understand ¡ ¡spa5al-­‑temporal ¡ workload ¡ Contributions Geometry ¡Query ¡ • Pyro ¡is ¡the ¡first ¡holis5c ¡solu5on ¡ specifically ¡designed ¡for ¡Spa5al-­‑ Temporal ¡Applica5ons. ¡ Translator ¡ ─ Internally ¡understands ¡ Spa5al-­‑Temporal ¡data ¡and ¡ Range ¡Queries ¡ query ¡ ─ Aggrega5vely ¡op5mizes ¡IO ¡ Big-­‑Data ¡Storage ¡ ─ Manages ¡data ¡replicas ¡to ¡ mi5gate ¡workload ¡ hotspots ¡ 3 ¡

  4. Background HBase • Hbase ¡ ─ The ¡table ¡is ¡horizontally ¡ divided ¡into ¡HRegions. ¡ HRegion ¡ ─ Each ¡HRegion ¡is ¡ver5cally ¡ divided ¡into ¡stores, ¡one ¡store ¡ Store ¡ Store ¡ MemStore ¡ MemStore ¡ per ¡column ¡family. ¡ StoreFile ¡ StoreFile ¡ StoreFile ¡ StoreFile ¡ ─ Data ¡is ¡first ¡cached ¡in ¡the ¡ MemStore, ¡and ¡then ¡flushed ¡ into ¡a ¡StoreFile ¡when ¡the ¡size ¡ threshold ¡is ¡reached. ¡ ¡ ¡ Name ¡Node ¡ DFS ¡Client ¡ • HDFS ¡ ─ The ¡Name ¡Node ¡manages ¡file ¡ system ¡namespaces. ¡ ─ Data ¡Nodes ¡store ¡data ¡chunks ¡ ─ DFS ¡Client ¡exposes ¡APIs. ¡ ¡ Data ¡Node ¡ Data ¡Node ¡ Data ¡Node ¡ 4 ¡

  5. Pyro Architecture • Geometry ¡Translator ¡ ‒ Encoding ¡spa5al-­‑temporal ¡ informa5on ¡into ¡row ¡keys, ¡ HRegion ¡ Geometry ¡Translator ¡ and ¡transla5ng ¡geometry ¡ queries ¡into ¡range ¡scans ¡ Store ¡ Store ¡ MemStore ¡ MemStore ¡ StoreFile ¡ StoreFile ¡ StoreFile ¡ StoreFile ¡ Mul5-­‑Scan ¡Op5mizer ¡ Mul5-­‑Scan ¡Op5mizer ¡ • Mul5-­‑Scan ¡Op5mizer ¡ ─ Aggrega5vely ¡op5mizing ¡ all ¡range ¡scans ¡of ¡the ¡same ¡ geometry ¡query ¡ Name ¡Node ¡ DFS ¡Client ¡ Replica ¡Group ¡ Group-­‑Based ¡Replica ¡Placement ¡Policy ¡ Manager ¡ • Group-­‑Based ¡Replica ¡Placement ¡ ─ Improves ¡data ¡locality ¡ during ¡workload ¡dynamics. ¡ Data ¡Node ¡ Data ¡Node ¡ Data ¡Node ¡ 5 ¡

  6. Pyro Architecture • Geometry ¡Translator ¡ ‒ Encoding ¡spa5al-­‑temporal ¡ informa5on ¡into ¡row ¡keys, ¡ HRegion ¡ Geometry ¡Translator ¡ and ¡transla5ng ¡geometry ¡ queries ¡into ¡range ¡scans ¡ Store ¡ Store ¡ MemStore ¡ MemStore ¡ StoreFile ¡ StoreFile ¡ StoreFile ¡ StoreFile ¡ Mul5-­‑Scan ¡Op5mizer ¡ Mul5-­‑Scan ¡Op5mizer ¡ • Mul5-­‑Scan ¡Op5mizer ¡ ─ Aggrega5vely ¡op5mizing ¡ all ¡range ¡scans ¡of ¡the ¡same ¡ geometry ¡query ¡ Name ¡Node ¡ DFS ¡Client ¡ Replica ¡Group ¡ Group-­‑Based ¡Replica ¡Placement ¡Policy ¡ Manager ¡ • Group-­‑Based ¡Replica ¡Placement ¡ ─ Improves ¡data ¡locality ¡ during ¡workload ¡dynamics. ¡ Data ¡Node ¡ Data ¡Node ¡ Data ¡Node ¡ 6 ¡

  7. Geometry Translator 0 1 2 3 0 1 4 5 1 0 15 14 • The ¡space ¡is ¡recursively ¡ divided ¡into ¡5les ¡using ¡a ¡ 4 5 6 7 2 3 6 7 2 3 12 13 quad-­‑tree ¡ 8 9 10 11 8 9 12 13 5 4 11 10 12 13 14 15 10 11 14 15 6 7 8 9 • Using ¡a ¡space ¡filling ¡curve ¡ (a) ¡Strip-­‑Encoding (b) ¡ZOrder-­‑Encoding (c) ¡Moore-­‑Encoding (Z, ¡Moore, ¡Hilbert, ¡etc.) ¡to ¡ encode ¡5les ¡ Visited unvisited Fetched • Use ¡the ¡same ¡quad-­‑tree ¡to ¡ Requested calculate ¡the ¡5les ¡that ¡ intersect ¡with ¡the ¡ geometry ¡ • Tiles ¡then ¡turns ¡into ¡range ¡ scans. ¡ 7 ¡

  8. Pyro Architecture • Geometry ¡Translator ¡ ‒ Encoding ¡spa5al-­‑temporal ¡ informa5on ¡into ¡row ¡keys, ¡ HRegion ¡ Geometry ¡Translator ¡ and ¡transla5ng ¡geometry ¡ queries ¡into ¡range ¡scans ¡ Store ¡ Store ¡ MemStore ¡ MemStore ¡ StoreFile ¡ StoreFile ¡ StoreFile ¡ StoreFile ¡ Mul5-­‑Scan ¡Op5mizer ¡ Mul5-­‑Scan ¡Op5mizer ¡ • Mul5-­‑Scan ¡Op5mizer ¡ ─ Aggrega5vely ¡op5mizing ¡ all ¡range ¡scans ¡of ¡the ¡same ¡ geometry ¡query ¡ Master ¡Node ¡ DFS ¡Client ¡ Replica ¡Group ¡ Group-­‑Based ¡Replica ¡Placement ¡Policy ¡ Manager ¡ • Group-­‑Based ¡Replica ¡Placement ¡ ─ Improves ¡data ¡locality ¡ during ¡workload ¡dynamics. ¡ Data ¡Node ¡ Data ¡Node ¡ Data ¡Node ¡ 8 ¡

  9. Multi-Scan Optimizer: Read Amplification • A ¡Geometry ¡query ¡may ¡translate ¡into ¡a ¡large ¡number ¡of ¡range ¡scans. ¡ • These ¡range ¡scans ¡usually ¡force ¡the ¡underlying ¡system ¡to ¡fetch ¡more ¡data ¡ or ¡repeatedly ¡go ¡through ¡the ¡same ¡data ¡structure. ¡ In ¡logic On ¡Disk 64KB ¡ HBlocks Read ¡Area ¡Amplifica5on ¡ Read ¡Volume ¡Amplifica5on ¡ KV KV KV KV KV KV Redundant ¡Read ¡ 9 ¡

  10. Multi-Scan Optimizer: Use Small Tile and HBlocks • Keep ¡5le ¡size ¡and ¡block ¡ 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 size ¡small, ¡and ¡ One ¡p-­‑read Requested ¡Block Fetched ¡Block aggrega5vely ¡op5mize ¡ range ¡scans. ¡ • Profile ¡P-­‑Read ¡delay ¡vs ¡ size. ¡ P-­‑Read ¡Size ¡ 1 ¡Block ¡ 13 ¡Block ¡ ¡ P-­‑Read ¡Delay ¡ 9ms ¡ 20ms ¡ • Use ¡Dynamic ¡ Adap5ve ¡Aggrega5on ¡Algorithm: ¡ Programming ¡to ¡ determine ¡which ¡ blocks ¡to ¡read ¡ 10 ¡

  11. Pyro Architecture • Geometry ¡Translator ¡ ‒ Encoding ¡spa5al-­‑temporal ¡ informa5on ¡into ¡row ¡keys, ¡ HRegion ¡ Geometry ¡Translator ¡ and ¡transla5ng ¡geometry ¡ queries ¡into ¡range ¡scans ¡ Store ¡ Store ¡ MemStore ¡ MemStore ¡ StoreFile ¡ StoreFile ¡ StoreFile ¡ StoreFile ¡ Mul5-­‑Scan ¡Op5mizer ¡ Mul5-­‑Scan ¡Op5mizer ¡ • Mul5-­‑Scan ¡Op5mizer ¡ ─ Aggrega5vely ¡op5mizing ¡ all ¡range ¡scans ¡of ¡the ¡same ¡ geometry ¡query ¡ Master ¡Node ¡ DFS ¡Client ¡ Replica ¡Group ¡ Group-­‑Based ¡Replica ¡Placement ¡Policy ¡ Manager ¡ • Group-­‑Based ¡Replica ¡Placement ¡ ─ Improves ¡data ¡locality ¡ during ¡workload ¡dynamics. ¡ Data ¡Node ¡ Data ¡Node ¡ Data ¡Node ¡ 11 ¡

  12. Group-Based Replica Placement • Each ¡HRegion ¡handles ¡a ¡range ¡of ¡row ¡keys, ¡that ¡corresponds ¡to ¡a ¡subarea ¡ in ¡the ¡space. ¡ • Spa5al-­‑temporal ¡applica5ons ¡naturally ¡create ¡dynamic ¡workload ¡hotspots ¡ within ¡small ¡areas ¡that ¡may ¡overwhelm ¡corresponding ¡HRegion ¡servers. ¡ 20:00-­‑23:59 ¡ ¡ 06:00-­‑09:59 ¡ ¡ 20:00-­‑23:59 ¡ ¡ 12 ¡ Dec ¡31, ¡2012 ¡ Jan ¡1, ¡2013 ¡ Jul ¡4, ¡2013 ¡

  13. Group-Based Replica Placement Policy • A ¡HRegion ¡can ¡split ¡to ¡input ¡mul5ple ¡daughter ¡HRegions, ¡and ¡these ¡ daughter ¡HRegions ¡can ¡be ¡moved ¡into ¡other ¡machines ¡to ¡mi5gate ¡ workload ¡hotspot. ¡ • HRegions ¡usually ¡co-­‑locate ¡with ¡HDFS ¡datanodes ¡that ¡allows ¡read/write ¡ data ¡locality. ¡Spliing ¡may ¡destroy ¡data ¡locality. ¡ • Pyro ¡employs ¡group-­‑based ¡replica ¡placement ¡to ¡achieve ¡data ¡locality. ¡ Pre-­‑Split ¡Keys ¡ shard ¡ shard ¡ shard ¡ shard ¡ Group ¡0 ¡ R1 ¡ Group ¡3 ¡ Group ¡1 ¡ R2 ¡ Group ¡2 ¡ R3 ¡ 13 ¡

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend