lecture the google bigtable
play

Lecture: The Google Bigtable - PowerPoint PPT Presentation

Lecture: The Google Bigtable h#p://research.google.com/archive/bigtable.html 10/09/2014 Romain Jaco3n romain.jaco7n@orange.fr Agenda Introduc3on Data model API


  1. Lecture: ¡ The ¡ ¡ ¡Google ¡ ¡Bigtable ¡ h#p://research.google.com/archive/bigtable.html ¡ 10/09/2014 ¡ Romain ¡Jaco3n ¡ romain.jaco7n@orange.fr ¡

  2. Agenda ¡ • Introduc3on ¡ Data ¡model ¡ • API ¡ • Building ¡blocks ¡ • is ¡it ¡the ¡Google’s ¡big ¡table ¡? ¡ ¡ ;-­‑) ¡ Implementa7on ¡ • Refinements ¡ • Performance ¡evalua7on ¡ • Experience ¡ • Conclusions ¡ • 2 ¡

  3. Introduc7on ¡ Abstract ¡ Bigtable ¡is ¡a ¡distributed ¡storage ¡system ¡for ¡managing ¡structured ¡data ¡ • Designed ¡to ¡scale ¡to ¡a ¡very ¡large ¡size: ¡petabytes ¡of ¡data ¡across ¡thousands ¡of ¡commodity ¡servers ¡ – It ¡is ¡not ¡a ¡rela7onal ¡database, ¡it ¡is ¡a ¡sparse, ¡distributed, ¡persistent ¡mul7-­‑dimensional ¡sorted ¡map ¡(key/value ¡store) ¡ – Many ¡projects ¡at ¡Google ¡store ¡data ¡in ¡Bigtable ¡ • Web ¡indexing, ¡Google ¡earth ¡and ¡Google ¡finance, ¡… ¡ – Different ¡data ¡sizes : ¡URL, ¡web ¡pages, ¡satellite ¡imagery, ¡… ¡ – Different ¡latency ¡requirements : ¡backend ¡bulk ¡processing ¡to ¡real-­‑7me ¡data ¡serving ¡ – à ¡ Bigtable ¡is ¡a ¡flexible, ¡high ¡performance ¡solu<on ¡ • 3 ¡

  4. Agenda ¡ • Introduc7on ¡ Data ¡model ¡ • API ¡ • Building ¡blocks ¡ • Implementa7on ¡ • Refinements ¡ • Performance ¡evalua7on ¡ • Experience ¡ • Conclusions ¡ • 4 ¡

  5. Data ¡model ¡ Column ¡Family ¡example ¡ Column ¡Family ¡example ¡with ¡ with ¡only ¡one ¡column ¡key ¡ variable ¡mul3ple ¡column ¡keys ¡ Column ¡ Column ¡Family ¡ Column ¡Family ¡ Column ¡Family ¡ Family ¡ Column ¡key ¡ contents ¡ language ¡ anchor ¡ name ¡ string ¡= ¡family:qualifier ¡ contents: ¡ language: ¡ anchor:cnnsi.com ¡ anchor:my.look.ca ¡ ¡ 64 ¡KB ¡string ¡in ¡lexicographic ¡order ¡ <html>… ¡ ¡ ß ¡t3 ¡ com.cnn.www ¡ EN ¡ CNN ¡ CNN.com ¡ ß ¡t6 ¡ ß ¡t9 ¡ ß ¡t8 ¡ <html>… ¡ ß ¡t5 ¡ ¡ <html>… ¡ ß ¡t6 ¡ ¡ Row ¡key ¡ Tablet ¡1 ¡ com.google.www ¡ A ¡cell ¡is ¡an ¡un-­‑interpreted ¡ array ¡of ¡bytes ¡ com.lego.com ¡ Cell ¡versions ¡are ¡custom ¡garbage-­‑collected ¡by ¡ column ¡family: ¡ ¡ org.apache.hadoop ¡ Keep ¡the ¡last ¡N ¡versions ¡ • Tablet ¡2 ¡ Only ¡keep ¡values ¡wriQen ¡in ¡the ¡last ¡M ¡days ¡ • org.apache.hbase ¡ ¡ The ¡row ¡range ¡for ¡a ¡ Timestamp ¡management ¡requires ¡delete ¡opera7ons ¡ table ¡is ¡dynamically ¡ to ¡be ¡also ¡recorded ¡( = ¡tombstone ¡marker ) ¡ par33oned ¡in ¡tablets ¡ org.golang ¡ 5 ¡ Tablet ¡3 ¡

  6. Agenda ¡ • Introduc7on ¡ Data ¡model ¡ • API ¡ • Building ¡blocks ¡ • Implementa7on ¡ • Refinements ¡ • Performance ¡evalua7on ¡ • Experience ¡ • Conclusions ¡ • 6 ¡

  7. API ¡ Bigtable ¡API ¡ • Tablet ¡server ¡ ¡ AddServer ( tabletServer ) / RemoveServer ( tabletServer ) � • Table ¡ ¡ ¡ ¡ CreateTable ( table ) / DeleteTable ( table ) � • Column ¡family ¡ CreateColumnFamily ( columnFamily ) / DeleteColumnFamily ( columnFamily ) � • Table ¡access ¡control ¡rights ¡and ¡metadata ¡ ¡ SetTableFlag ( table, flags ) / . . . � • Colum ¡family ¡access ¡control ¡rights ¡and ¡metadata ¡ SetColumnFamilyFlag ( table, colfamily, flags ) / . . . � • Cell ¡value ¡ ¡ Put ( rowkey , columnkey , value ) / Get ( rowkey , columnkey ) / Delete ( rowkey , columnkey ) � • Look ¡up ¡value ¡from ¡individual ¡row ¡ ¡ Has ( rowkey, columnfamily ) / . . . ¡ • Look ¡up ¡values ¡from ¡table ¡ ( =MapReduce ¡like ¡RPC ) ¡ Scan ( rowFilter , columnFilter , timestampFilter ) � Can ¡iterate ¡over ¡mul7ple ¡column ¡families ¡ – Can ¡limi7ng ¡rows/colums/7mestamps ¡ – • Single-­‑row ¡transac3ons ¡(atomic ¡read-­‑modify-­‑write ¡sequence) ¡ • No ¡support ¡for ¡general ¡transac3ons ¡across ¡row ¡keys ¡ • Cells ¡can ¡be ¡used ¡as ¡integer ¡counters ¡ ¡ Increment ( rowkey , columnkey , increment ) ¡ • Execu3on ¡of ¡read-­‑only ¡client-­‑supplied ¡scripts ¡in ¡the ¡address ¡spaces ¡of ¡the ¡servers: ¡ Sawzall ¡ – h#p://research.google.com/archive/sawzall.html ¡ • Bigtable ¡can ¡be ¡used ¡with ¡MapReduce ¡(for ¡input ¡and/or ¡output) ¡ 7 ¡

  8. Agenda ¡ • Introduc7on ¡ Data ¡model ¡ • API ¡ • Building ¡blocks ¡ • Implementa7on ¡ • Refinements ¡ • Performance ¡evalua7on ¡ • Experience ¡ • Conclusions ¡ • 8 ¡

  9. Building ¡blocks ¡ Google ¡File ¡System ¡ ( ¡ GFS ¡ ) ¡ System ¡ Google ¡ File ¡ Bigtable ¡uses ¡the ¡fault-­‑tolerant ¡and ¡scalable ¡distributed ¡ • METADATA ¡tablets ¡ (128 ¡MB) ¡ GFS ¡file ¡system ¡to ¡store ¡log ¡and ¡data ¡files ¡ metadata ¡ ¡= ¡METADATA ¡tablets ¡(store ¡tablets ¡loca7on) ¡ – METADATA ¡ METADATA ¡ METADATA ¡ data ¡ ¡ ¡= ¡SSTables ¡collec7on ¡by ¡tablet ¡ – root ¡tablet ¡ tablet ¡1-­‑42 ¡ tablet ¡43-­‑51 ¡ log ¡ ¡ ¡= ¡Tablet ¡logs ¡ – DATA ¡tablets ¡ = ¡SSTable ¡files ¡ (64 ¡KB ¡blocks) ¡ Google ¡SSTable ¡file ¡format ¡ ( ¡ S orted ¡ S tring ¡ Table ¡ ) ¡ Block ¡ Block ¡ Block ¡ Block ¡ Block ¡index ¡ 0 ¡ 1 ¡ 2 ¡ 3 ¡ Tablet ¡1 ¡ Used ¡to ¡store ¡table ¡data ¡in ¡GFS ¡ • Log ¡files ¡ Persistent, ¡ordered ¡immutable ¡map ¡from ¡keys ¡to ¡values ¡ – Commit ¡log ¡ Commit ¡log ¡ Commit ¡log ¡ Tablet ¡3 ¡ Tablet ¡1 ¡ Tablet ¡2 ¡ 9 ¡

  10. Building ¡blocks ¡ Google ¡SSTable ¡file ¡format ¡ ( ¡ S orted ¡ S tring ¡ Table ¡ ) ¡ Contains ¡a ¡sequence ¡of ¡64 ¡KB ¡Blocks ¡ (size ¡configurable) ¡ • Op7onally, ¡Blocks ¡can ¡be ¡completely ¡mapped ¡into ¡memory ¡(= ¡lookups ¡and ¡scans ¡without ¡touching ¡disk) ¡ • Block ¡index ¡stored ¡at ¡the ¡end ¡of ¡the ¡file ¡ • Used ¡to ¡locate ¡blocks ¡ – Index ¡loaded ¡in ¡memory ¡when ¡the ¡SSTable ¡is ¡opened ¡ – Lookup ¡with ¡a ¡single ¡seek ¡ – 1. Find ¡the ¡appropriate ¡block ¡by ¡performing ¡a ¡binary ¡search ¡in ¡the ¡in-­‑memory ¡index ¡ 2. Reading ¡the ¡appropriate ¡block ¡from ¡disk ¡ col ¡key ¡ 7mestamp ¡ value ¡ Block ¡0 ¡ Block ¡1 ¡ Block ¡2 ¡ Block ¡3 ¡ rowkey ¡ 1 ¡ value ¡ col ¡key ¡ 7mestamp ¡ File ¡offset ¡ File ¡offset ¡ File ¡offset ¡ File ¡offset ¡ col ¡key ¡ value ¡ 7mestamp ¡ First ¡row ¡ rowkey ¡ 1 ¡ First ¡row ¡ rowkey ¡ 4 ¡ First ¡row ¡ rowkey ¡ 10 ¡ First ¡row ¡ rowkey ¡ 15 ¡ rowkey ¡ 2 ¡ value ¡ col ¡key ¡ 7mestamp ¡ Last ¡row ¡ rowkey ¡ 3 ¡ Last ¡row ¡ rowkey ¡ 9 ¡ Last ¡row ¡ rowkey ¡ 14 ¡ Last ¡row ¡ rowkey ¡ 18 ¡ col ¡key ¡ value ¡ rowkey ¡ 3 ¡ 7mestamp ¡ Block ¡ Block ¡ Block ¡ Block ¡ Block ¡index ¡ 0 ¡ 1 ¡ 2 ¡ 3 ¡ Tablet ¡1 ¡ 10 ¡

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