SlideShare a Scribd company logo
1 of 110
Download to read offline
Apache Accumulo
Introduction
Introduction

• Aaron Cordova


  • Founded Accumulo project with several others


  • Led development through release 1.0


  • aaron@tetraconcepts.com
Agenda

• Introduction


• Data Model


• API


• Architecture - scaling, recovery


• Security


• Data-lifecycle


• Applications
Introduction
History

• Began writing in summer of 2008, after comparing design goals with BigTable
  paper and existing implementations Hbase, Hypertable


• Released internal version 1.0 summer of 2009.


• September 2011 accepted as an Apache Incubator project. Doug Cutting,
  founder of Hadoop, was the Champion Sponsor


• Feb 2012 1.4 Released


• March 2012 graduates to a top level Apache project


• V 1.5 due out soon
Introduction

• Accumulo is a sparse, distributed, sorted, multi-dimensional map


• Modeled after Google’s BigTable design


• Scales to trillions of records and 100s of Terabytes


• Features automatic load balancing, high-availability, dynamic control over
  data layout
Data Model
Data Model




                       Key
                   Column                              Value
 row ID                                    Timestamp
          Family   Qualifier   Visibility
Data Model (Logical 2D table structure)


          attribute:   attribute:   purchases:
                                                 returns:hat
             age        phone        sneakers

   bill      49        555-1212       $100            -


 george      38            -           $80          $30
Physical layout (sorted keys)


   row      col fam    col qual   col vis     time     value

   bill    attribute     age      public    Jun 2010    49

   bill    attribute   phone      private   Jun 2010 555-1212

   bill    purchases sneakers     public    Apr 2010   $100

  george   attribute     age      private   Oct 2009    38

  george   purchases sneakers     public    Nov 2009   $80

  george    returns      hat      public    Dec 2009   $30
High-level API
Accumulo API

• To use Accumulo, must write a an application using the Accumulo Java client
  library. There is no SQL (hence NoSQL)


• Data is packaged into Mutation objects which are added to a BatchWriter
  which sends them to TabletServers


• Clients can scan a set of key value pairs by specifying optional start and end
  keys (Range) and obtaining a Scanner. Iterating over the scanner returns
  sorted key value pairs for that range. Each scan takes milliseconds to start.


• Can scan over a subset of the columns


• Can send a set of Ranges to a BatchScanner, get matching key value pairs,
  unsorted
Insert



   row      col fam    col qual   col vis     time     value

    bill   attribute     age      public    Jun 2010    49

    bill   purchases sneakers     public    Apr 2010   $100

  george   attribute     age      private   Oct 2009    38

  george   purchases sneakers     public    Nov 2009   $80

  george    returns      hat      public    Dec 2009   $30
Insert

           bill attribute phone private Jun 2010 555-1212

   row        col fam    col qual   col vis     time        value

    bill     attribute     age      public    Jun 2010       49

    bill    purchases sneakers      public    Apr 2010      $100

  george     attribute     age      private   Oct 2009       38

  george    purchases sneakers      public    Nov 2009      $80

  george      returns      hat      public    Dec 2009      $30
Insert


   row      col fam    col qual   col vis     time     value

    bill   attribute     age      public    Jun 2010    49

   bill    attribute   phone      private Jun 2010 555-1212

    bill   purchases sneakers     public    Apr 2010   $100

  george   attribute     age      private   Oct 2009    38

  george   purchases sneakers     public    Nov 2009   $80

  george    returns      hat      public    Dec 2009   $30
Scan - Full key lookup
   bill attribute phone private Jun 2010

   row       col fam     col qual   col vis     time     value

   bill      attribute     age      public    Jun 2010    49

   bill      attribute    phone     private   Jun 2010 555-1212

   bill    purchases sneakers       public    Apr 2010   $100

  george     attribute     age      private   Oct 2009    38

  george   purchases sneakers       public    Nov 2009   $80

  george     returns       hat      public    Dec 2009   $30
Scan - Single row

          bill

   row            col fam    col qual   col vis     time     value

   bill          attribute     age      public    Jun 2010    49

   bill          attribute   phone      private   Jun 2010 555-1212

   bill          purchases sneakers     public    Apr 2010   $100

  george         attribute     age      private   Oct 2009    38

  george         purchases sneakers     public    Nov 2009   $80

  george          returns      hat      public    Dec 2009   $30
Scan - Multiple Rows

      bill - will

   row          col fam    col qual   col vis     time     value

   bill        attribute     age      public    Jun 2010    49

   bill        attribute   phone      private   Jun 2010 555-1212

   bill       purchases sneakers      public    Apr 2010   $100

  george       attribute     age      private   Oct 2009    38

  george      purchases sneakers      public    Nov 2009   $80

  george        returns      hat      public    Dec 2009   $30
Scan - Multiple Rows, Selected Columns

    bill - will, fetch purchases

   row       col fam      col qual   col vis     time     value

   bill      attribute       age     public    Jun 2010    49

   bill      attribute     phone     private   Jun 2010 555-1212

   bill     purchases sneakers       public    Apr 2010   $100

  george     attribute       age     private   Oct 2009    38

  george    purchases sneakers       public    Nov 2009   $80

  george      returns        hat     public    Dec 2009   $30
Architecture - Scaling and Recovery
Performance                                                                                  Accumulo
                                                                                             BigTable circa 2006
                                                                                             Cassandra
• Accumulo ‘scales’ because
  aggregate read and write                                                       10000
  performance increase as more
  machines are added, and




                                                Thousands of writes per second
  because individual reads/write
  performance remains very good                                                  1000
  even with trillions of key-value
  pairs already in the system

• Sources: http://www.slideshare.net/
  acordova00/accumulo-on-ec2                                                      100
  http://techblog.netflix.com/2011/11/
  benchmarking-cassandra-scalability-on.html

  http://static.googleusercontent.com/
  external_content/untrusted_dlcp/
  research.google.com/en/us/archive/bigtable-                                       10
  osdi06.pdf                                                                             1   16      64      256   1024
                                                                                             Number of machines
Accumulo Prerequisites

• One to hundreds of computers with local hard drives, connected via ethernet


• Password-less SSH access


• Local directory for write-ahead logs


• Hadoop and ZooKeeper installed, configured, and running
Architecture


                 Accumulo




                            ZooKeeper
        HDFS   MapReduce
Architecture: HDFS



                       HDFS
                                 NameNode

                     DataNodes




                        File
Architecture: HDFS



                         HDFS
                                 NameNode

                     DataNodes




               Block 1      Block 2
Architecture: HDFS



                       HDFS
                                 NameNode

                     DataNodes
Architecture: Tables



                       Accumulo
                                    Master

                   Tablet Servers




                        Table
Architecture: Tables



                        Accumulo
                                            Master

                      Tablet Servers




                 P1        P2          P3
Architecture: Tables



                       Accumulo
                                    Master

                   Tablet Servers
Architecture: Writes


                       P1 Mem
                         Table




             File1

                                 HDFS
Architecture: Writes


                       P1 Mem         Client
                         Table



                                 Write-ahead Log
             File1

                                  HDFS
Architecture: Writes


                       P1 Mem
                         Table



                                  Write-ahead Log
             File1       File 2

                                   HDFS
Architecture: Writes


                       P1 Mem
                         Table



                                  X Write-ahead Log
             File1       File 2

                                    HDFS
Architecture: Splits


   row      col fam    col qual   col vis     time     value

    bill   attribute     age      public    Jun 2010    49

    bill   attribute   phone      private   Jun 2010 555-1212

    bill   purchases sneakers     public    Apr 2010   $100


  george   attribute     age      private   Oct 2009    38

  george   purchases sneakers     public    Nov 2009   $80

  george    returns      hat      public    Dec 2009   $30
Architecture: Splits



                         Accumulo
                                        Master

                       Tablet Servers
Architecture: Splits



                         Accumulo
                                        Master

                       Tablet Servers
Architecture: Splits



                         Accumulo
                                        Master

                       Tablet Servers
Sorted keys - dynamic partitioning
• Because keys are sorted, tables can be partitioned based on the data


   • partitions (tablets) are uniform in size, regardless of data distribution,
     (as long as single rows are smaller than the partition size)


   • not based on the number of servers


• Can add /remove / fail servers at any time, the system is always automatically
  balanced
Partitioning Contrast

• Some relational databases allow partitioning. May require users to choose a
  field or two on which to partition. Hopefully that field is uniformly distributed


• Hash-based systems (default Cassandra, CouchDB, Riak, Voldemort) avoid
  this problem, but at the cost of range scans. Some support range scans via
  other means.


• Many systems couple partition storage with partition service, requiring data
  movement to rebalance partition service (MongoDB, Cassandra, etc)
Architecture: Reads



                P1        Mem     Client
                          Table

                        Merge



        File1         File 2
Architecture: Recovery


                     Accumulo
                                     Master

                   Tablet Servers




                         DataNodes
                                      NameNode
Architecture: Recovery


                     Accumulo
                                     Master

                   Tablet Servers




                         DataNodes
                                      NameNode
Architecture: Recovery


                     Accumulo
                                     Master

                   Tablet Servers




                         DataNodes
                                      NameNode
Architecture: Recovery


                     Accumulo
                                     Master

                   Tablet Servers




                         DataNodes
                                      NameNode
Architecture: Recovery


                     Accumulo
                                     Master

                   Tablet Servers



                      Master reassigns
                         DataNodes
                                      NameNode
Architecture: Recovery


                     Accumulo
                                     Master

                   Tablet Servers



                     Replay Write-ahead Log
                         DataNodes
                                      NameNode
Architecture: Recovery


                     Accumulo
                                     Master

                   Tablet Servers




                         DataNodes
                                      NameNode
Architecture: Recovery


                     Accumulo
                                     Master

                   Tablet Servers




                         DataNodes
                                      NameNode
Metadata Hierarchy

       metadata table
                               root



                 md1           md2     md3


 user tables

         user1         user2          index1   index2
Architecture: Lookup


                       Accumulo
                                    Master

                  Tablet Servers




                                   ZooKeeper



                        Client
Architecture: Lookup


                       Accumulo
                                      Master

                    Tablet Servers




                                     ZooKeeper
 Client knows zookeeper,
      finds root tablet

                        Client
Architecture: Lookup


                        Accumulo
                                        Master

                      Tablet Servers




                                       ZooKeeper
  Scan root tablet
find metadata tablet
 that describes the
user table we want
                             Client
Architecture: Lookup


                             Accumulo
                                             Master

                           Tablet Servers




                                            ZooKeeper
  Read location info
of tablets of user table
     and cache it
                                  Client
Architecture: Lookup


                              Accumulo
                                            Master

                         Tablet Servers




                                           ZooKeeper
 Read directly from server
holding the tablets we want

                                  Client
Architecture: Lookup


                        Accumulo
                                        Master

                      Tablet Servers




                                       ZooKeeper
 Find other tablets
 via cache lookups

                             Client
Security
Security


    •   Design and Guarantees

    •   Data Labeling

    •   Authentication

    •   User Configuration
Data Security

 •   Accumulo will only return cells whose visibility labels are
     satisfied by user credentials presented at Scan time

 •   Two necessary conditions

     •   Correctly labeling data on ingest

     •   Presenting right user credentials
Security Labels




            Extension of BigTable data model

                     column
   row ID                                timestamp value
            family qualifier visibility
Column Visibility



row      col fam     col qual   col vis   time     value
bill     attribute   age        public    Jun 2010 49

bill     attribute   phone      private   Jun 2010 555-1212

bill     purchases sneakers public        Apr 2010 $100

george   attribute   age        private   Oct 2009 38
george   purchases sneakers public        Nov 2009 $80
george   returns     hat        public    Dec 2009 $30
Security Label Syntax

 •   A & B - both A and B required

 •   A | B - must have either A or B

 •   (A | B) & C - must have C and A or B

 •   A | (B & C) - must have A or both B and C

 •   A & (B | (C & D))
Security Label Example

 •   Drive needs:

     •   license&over15

 •   Join military:

 •   	  (over17|(over16&parentConsent)) & (greencard|
     USCitizen)

 •   Access to Classified data

 •   TS&SI&(USA|GBR|NZL|CAN|AUS)
Security Model


                  Security Perimeter

                         Accumulo

     auths        data
                            auths
         Trusted Client             Auth Service
                           verify

ID, password, cert        data
                User
Trusted Client Responsibility

 •   Ensure that credentials belong to the user

 •   Ensure that the user is authenticated
Application Authorization

•   Trusted Client applications must have max authorizations set
    before they can be passed

•   The Trusted Client limits the set of authorizations by application
Application Authorization Example

 •    Data may be labeled with any combination of the following:

     { personal, research, finance, diet, cancer }



 •    We wish to limit certain applications to a subset
Example Table


row    colF      ColQ   col vis                      value
row0   name      -      personal|finance              John
row0   age       -      personal|research            49
row0   phone     -      personal|finance              555-1212
row0   owed      -      personal|finance              $5440

row0   diagnosis -      personal|(research &         melanom
                        cancer)                      a

row0   diagnosis -      personal|(research & diet)   diabetes
Application Authorizations

Cancer Research: cancer diagnoses, age

Diabetes Research: diet info, age

Accounting System: balance, name, phone

Personal Records Management: all
Security Model


                  Security Perimeter

                      Accumulo


          Cancer                 Auth Service
       Research App


ID, password, cert
              Researcher
Security Model


                  Security Perimeter

                      Accumulo


          Cancer                  Auth Service
       Research App      verify

ID, password, cert
              Researcher
Security Model


                  Security Perimeter

                      Accumulo

                research, cancer, diabetes
          Cancer              Auth Service
       Research App    verify

ID, password, cert
              Researcher
Security Model


                   Security Perimeter

                       Accumulo
     research,
      cancer
          Cancer                  Auth Service
       Research App


ID, password, cert
                 Researcher
Security Model


                   Security Perimeter

                         Accumulo
     research,
                  data
      cancer
          Cancer                    Auth Service
       Research App


ID, password, cert
                 Researcher
Security Model


                   Security Perimeter

                         Accumulo
     research,
                  data
      cancer
          Cancer                    Auth Service
       Research App


ID, password, cert       data
                 Researcher
Data life-cycle
Data Model




                       Key
                   Column                              Value
 row ID                                    Timestamp
          Family   Qualifier   Visibility
Versions


  What can we do with multiple versions of the same data?


     rowID    family   qualifier   timestamp value
     row1     fam1     qual1      1005      2
     row1     fam1     qual1      1004      5
     row1     fam1     qual1      1003      3
     row1     fam1     qual1      1002      2
     row1     fam1     qual1      1001      7
Iterators

• Mechanism for adding online functionality to tables


   • Aggregation (called Combiners)


   • Age-Off


   • Filtering (including by security label)
Versioning Iterators




     rowID    family   qualifier   timestamp value
     row1     fam1     qual1      1005      2
     row1     fam1     qual1      1004      5
     row1     fam1     qual1      1003      3
     row1     fam1     qual1      1002      2
     row1     fam1     qual1      1001      7
Filtering Iterators


     •   Age Off

     •   RegEx

     •   Arbitrary filtering
Age Off

• Can specify a particular date - e.g. delete everything older than July 1, 2007

• Can specify a time period - e.g. delete everything older than 6 months
Age-Off



             Current Time: 1103
rowID     family   qualifier   timestamp value
row1      fam1     qual1      1005      2        K/V pair is
                                                 more than
row1      fam1     qual1      1004      5       100 sec. old
row1      fam1     qual1      1003      3
row1      fam1     qual1      1002      2
row1      fam1     qual1      1001      7
Age-Off



            Current Time: 1104
rowID     family   qualifier   timestamp value    K/V pair is
                                                 more than
row1      fam1     qual1      1005      2       100 sec. old
row1      fam1     qual1      1004      5
row1      fam1     qual1      1003      3
row1      fam1     qual1      1002      2
row1      fam1     qual1      1001      7
Age-Off



            Current Time: 1105                   K/V pair is
                                                 more than
rowID     family   qualifier   timestamp value   100 sec. old
row1      fam1     qual1      1005      2
row1      fam1     qual1      1004      5
row1      fam1     qual1      1003      3
row1      fam1     qual1      1002      2
row1      fam1     qual1      1001      7
Manual Deletes

• Can insert ‘deletes’. They are inserted like other key-value pairs, any keys
  with an older timestamp is suppressed from reads


• Compactions write non-deleted data to new files


• Old files are then removed from HDFS


• To ensure data is deleted from disk,


   • write deletes (they are now absent from query results)


   • compact (can compact a particular range of a table if it’s large)
Garbage Collection

• Garbage collector compares the files in HDFS with the set of files currently
  active


• When files are no longer on the active list, GC waits for a while, then deletes
  from HDFS
Applications

• Fast lookups / scan on extremely large tables with flexible schemas, varying
  security


• Large index across heterogeneous data sets


• Continuous Summary Analytics via Iterators


• Secure Storage of key value pairs for MapReduce jobs
Where does your data come from?

• BigTable was designed to store data for web applications serving millions of
  users. Web application creates all the data. Many NoSQL databases are
  designed solely for this purpose. Accumulo can certainly support that.


• However, many organizations have lots of data from various sources. Different
  schema, different security levels. Bringing them together for analysis is very
  valuable. Accumulo can support this too.
Indexing and queries

• BigTable data model supports building a wide variety of indexes


   • Simple strings, numbers, geo points, ip addresses, etc


• Each has to be coupled with query code


• New applications should examine their data access use cases, indexes and
  query code to accomplish those can then be written


• Best applications are constructed so each user request is a single scan, or a
  small number of scans
Compared to MapReduce

• Hadoop’s HDFS stores simple files. Usually unsorted.


• MapReduce is designed to process all or most of the files at once.


• Accumulo maintains a set of sorted files in HDFS


• Accumulo scans are designed to access a small portion of the data quickly.


• Fairly complementary
Tough use case

• Ran MapReduce on some input data set to create a large result set.


• Now have a few new records, want to update the result set


• MapReduce has to process all the data again, have to wait


• Accumulo allows users to perform a limited set of operations to update a
  result set incrementally, using Iterators


• Result sets are always up to date, immediately after insert
Combiners


    row     col fam     col qual     col vis    time     value

    bill     perf      June_calls      P       June 1     9

    bill     perf      June_calls      P       June 4     3

    bill     perf      July_calls      P       July 3     4

    bill     perf      July_calls      P       July 11    7

    bill     perf     August_calls     P       Aug 12     5

    bill     perf     August_calls     P       Aug 29     2
Combiners


    row     col fam     col qual     col vis   time   value

     bill    perf      June_calls      P        -      12

     bill    perf      July_calls      P        -      11

     bill    perf     August_calls     P        -      7
Combiners

  •   Almost equivalent to Reduce of MapReduce except:

      •   Cannot assume we have seen all the values for a
          particular key

  •   Exactly equivalent to a Combiner function
Combiners

•   Useful Combiners:

    •   Event count (StringSummation or LongSummation aggregator)

    •   Event hour occurrence histogram (NumArraySummation
        aggregator)

    •   Event duration histogram (NumArraySummation aggregator)
Conceptual Graph Representation




                 b             d
      a

                     c
                                   e


          g
                           f
Edge table


   row   col fam   col qual col vis   time   value
   a     edge      f                         1.0
   c     edge      b                         1.0
   c     edge      d                         1.0
   d     edge      b                         1.0
   d     edge      e                         1.0
   e     edge      d                         1.0
   f     edge      g                         1.0
   g     edge      e                         1.0
   g     edge      f                         1.0
Edge Weights

•   Summing Combiners are typically used to efficiently and
    incrementally update edge weights

    •   See SummingCombiner
Edge table


             Incoming: a, edge, f, 1.0
row     col fam   col qual      col vis time   value
a       edge      f                            1.0
c       edge      b                            1.0
c       edge      d                            1.0
d       edge      b                            1.0
d       edge      e                            1.0
e       edge      d                            1.0
f       edge      g                            1.0
Edge table




row     col fam   col qual   col vis time   value
a       edge      f                         2.0
c       edge      b                         1.0
c       edge      d                         1.0
d       edge      b                         1.0
d       edge      e                         1.0
e       edge      d                         1.0
f       edge      g                         1.0
Edge table


             Incoming: c, edge, b, 6.0
row     col fam   col qual      col vis time   value
a       edge      f                            2.0
c       edge      b                            1.0
c       edge      d                            1.0
d       edge      b                            1.0
d       edge      e                            1.0
e       edge      d                            1.0
f       edge      g                            1.0
Edge table




row     col fam   col qual   col vis time   value
a       edge      f                         2.0
c       edge      b                         7.0
c       edge      d                         1.0
d       edge      b                         1.0
d       edge      e                         1.0
e       edge      d                         1.0
f       edge      g                         1.0
Edge table


             Incoming: a, edge, f, 2.3
row     col fam   col qual      col vis time   value
a       edge      f                            2.0
c       edge      b                            7.0
c       edge      d                            1.0
d       edge      b                            1.0
d       edge      e                            1.0
e       edge      d                            1.0
f       edge      g                            1.0
Edge table




row     col fam   col qual   col vis time   value
a       edge      f                         4.3
c       edge      b                         7.0
c       edge      d                         1.0
d       edge      b                         1.0
d       edge      e                         1.0
e       edge      d                         1.0
f       edge      g                         1.0
Edge Table Applications

• Graph Analytics - traversal, neighbors, connected components


• Neighborhood = feature vector. Vector-based machine learning techniques.
  Nearest neighbor search, clustering, classification


• Automated dossiers, fact accumulation - ‘tell me everything we know about
  X’ in a single scan


• Find entities based on features - ‘show me everyone who has feature value >
  x’ or ‘with < 5 neighbors of type k’
RDF Triples



row     col fam          col qual   col vis time   value
DC      is_capital_of    USA                       1.0
Don     vacations_in     Arctic                    7.0
Don     is_employed_by   MI6                       1.0
Sean    has_status       “007”                     1.0
Sean    starred_with     Ursula                    1.0
Sean    starred_with     Anya                      0.7
Sean    starred_with     Teresa                    0.3
RDF Triples - RYA

• See RYA project : http://www.usna.edu/Users/cs/adina/research/
  Rya_CloudI2012.pdf
Additional Training
Additional Training

• Talked about the basics today


• 3 days of developer training with hands on examples covering


   • installation, configuration, read / write API, MapReduce, security, table
     configuration, indexing specific types, querying index tables, combiners,
     custom iterators, table constraints, storing relational data, joins, high
     performance considerations, document-partitioned indexing (text search),
     machine learning, object persistence


• 2 days of administrator training covering


   • hardware selection, process assignment, troubleshooting, maintenance,
     replication and high availability, cluster modification, failure handling
Next Scheduled Training Sessions

• March 5-7 Columbia MD

• April 9-11 Columbia MD

• http://www.tetraconcepts.com/training

• aaron@tetraconcepts.com

• brian@tetraconcepts.com

More Related Content

What's hot

What's hot (20)

Google Bigtable Paper Presentation
Google Bigtable Paper PresentationGoogle Bigtable Paper Presentation
Google Bigtable Paper Presentation
 
Deep Dive into GPU Support in Apache Spark 3.x
Deep Dive into GPU Support in Apache Spark 3.xDeep Dive into GPU Support in Apache Spark 3.x
Deep Dive into GPU Support in Apache Spark 3.x
 
Transactional SQL in Apache Hive
Transactional SQL in Apache HiveTransactional SQL in Apache Hive
Transactional SQL in Apache Hive
 
Re-Architect Your Legacy Environment To Enable An Agile, Future-Ready Enterprise
Re-Architect Your Legacy Environment To Enable An Agile, Future-Ready EnterpriseRe-Architect Your Legacy Environment To Enable An Agile, Future-Ready Enterprise
Re-Architect Your Legacy Environment To Enable An Agile, Future-Ready Enterprise
 
Achieving 100k Queries per Hour on Hive on Tez
Achieving 100k Queries per Hour on Hive on TezAchieving 100k Queries per Hour on Hive on Tez
Achieving 100k Queries per Hour on Hive on Tez
 
MongoDB Case Study in Healthcare
MongoDB Case Study in HealthcareMongoDB Case Study in Healthcare
MongoDB Case Study in Healthcare
 
Google BigTable
Google BigTableGoogle BigTable
Google BigTable
 
Application Timeline Server - Past, Present and Future
Application Timeline Server - Past, Present and FutureApplication Timeline Server - Past, Present and Future
Application Timeline Server - Past, Present and Future
 
Hive Does ACID
Hive Does ACIDHive Does ACID
Hive Does ACID
 
Google Big Table
Google Big TableGoogle Big Table
Google Big Table
 
HBase HUG Presentation: Avoiding Full GCs with MemStore-Local Allocation Buffers
HBase HUG Presentation: Avoiding Full GCs with MemStore-Local Allocation BuffersHBase HUG Presentation: Avoiding Full GCs with MemStore-Local Allocation Buffers
HBase HUG Presentation: Avoiding Full GCs with MemStore-Local Allocation Buffers
 
Bigtable and Dynamo
Bigtable and DynamoBigtable and Dynamo
Bigtable and Dynamo
 
Apache Hudi: The Path Forward
Apache Hudi: The Path ForwardApache Hudi: The Path Forward
Apache Hudi: The Path Forward
 
Hive Anatomy
Hive AnatomyHive Anatomy
Hive Anatomy
 
HBase Application Performance Improvement
HBase Application Performance ImprovementHBase Application Performance Improvement
HBase Application Performance Improvement
 
Introduction to PgBench
Introduction to PgBenchIntroduction to PgBench
Introduction to PgBench
 
Optimizing S3 Write-heavy Spark workloads
Optimizing S3 Write-heavy Spark workloadsOptimizing S3 Write-heavy Spark workloads
Optimizing S3 Write-heavy Spark workloads
 
What every data programmer needs to know about disks
What every data programmer needs to know about disksWhat every data programmer needs to know about disks
What every data programmer needs to know about disks
 
Ibm spectrum scale fundamentals workshop for americas part 1 components archi...
Ibm spectrum scale fundamentals workshop for americas part 1 components archi...Ibm spectrum scale fundamentals workshop for americas part 1 components archi...
Ibm spectrum scale fundamentals workshop for americas part 1 components archi...
 
[MeetUp][1st] 오픈소스를 활용한 xflow 수집-시각화
[MeetUp][1st] 오픈소스를 활용한 xflow 수집-시각화[MeetUp][1st] 오픈소스를 활용한 xflow 수집-시각화
[MeetUp][1st] 오픈소스를 활용한 xflow 수집-시각화
 

Viewers also liked

An Introduction to Accumulo
An Introduction to AccumuloAn Introduction to Accumulo
An Introduction to Accumulo
Donald Miner
 
Accumulo Summit 2015: Alternatives to Apache Accumulo's Java API [API]
Accumulo Summit 2015: Alternatives to Apache Accumulo's Java API [API]Accumulo Summit 2015: Alternatives to Apache Accumulo's Java API [API]
Accumulo Summit 2015: Alternatives to Apache Accumulo's Java API [API]
Accumulo Summit
 
Accumulo Summit 2015: Tracing in Accumulo and HDFS [Internals]
Accumulo Summit 2015: Tracing in Accumulo and HDFS [Internals]Accumulo Summit 2015: Tracing in Accumulo and HDFS [Internals]
Accumulo Summit 2015: Tracing in Accumulo and HDFS [Internals]
Accumulo Summit
 
Accumulo meetup 20130109
Accumulo meetup 20130109Accumulo meetup 20130109
Accumulo meetup 20130109
Sqrrl
 
Accumulo Summit 2016: Accumulo in the Enterprise
Accumulo Summit 2016: Accumulo in the EnterpriseAccumulo Summit 2016: Accumulo in the Enterprise
Accumulo Summit 2016: Accumulo in the Enterprise
Accumulo Summit
 

Viewers also liked (20)

Introduction to Apache Accumulo
Introduction to Apache AccumuloIntroduction to Apache Accumulo
Introduction to Apache Accumulo
 
An Introduction to Accumulo
An Introduction to AccumuloAn Introduction to Accumulo
An Introduction to Accumulo
 
Apache Accumulo and the Data Lake
Apache Accumulo and the Data LakeApache Accumulo and the Data Lake
Apache Accumulo and the Data Lake
 
Machine Learning & Graph Processing w/ Spark and Accumulo
Machine Learning & Graph Processing w/ Spark and AccumuloMachine Learning & Graph Processing w/ Spark and Accumulo
Machine Learning & Graph Processing w/ Spark and Accumulo
 
Accumulo Summit 2015: Alternatives to Apache Accumulo's Java API [API]
Accumulo Summit 2015: Alternatives to Apache Accumulo's Java API [API]Accumulo Summit 2015: Alternatives to Apache Accumulo's Java API [API]
Accumulo Summit 2015: Alternatives to Apache Accumulo's Java API [API]
 
Faster Python
Faster PythonFaster Python
Faster Python
 
Reversing the dropbox client on windows
Reversing the dropbox client on windowsReversing the dropbox client on windows
Reversing the dropbox client on windows
 
Euro python2011 High Performance Python
Euro python2011 High Performance PythonEuro python2011 High Performance Python
Euro python2011 High Performance Python
 
Odessapy2013 - Graph databases and Python
Odessapy2013 - Graph databases and PythonOdessapy2013 - Graph databases and Python
Odessapy2013 - Graph databases and Python
 
Accumulo on EC2
Accumulo on EC2Accumulo on EC2
Accumulo on EC2
 
Sqrrl September Webinar: Cell-Level Security
Sqrrl September Webinar: Cell-Level SecuritySqrrl September Webinar: Cell-Level Security
Sqrrl September Webinar: Cell-Level Security
 
Accumulo Summit 2014: Four Orders of Magnitude: Running Large Scale Accumulo ...
Accumulo Summit 2014: Four Orders of Magnitude: Running Large Scale Accumulo ...Accumulo Summit 2014: Four Orders of Magnitude: Running Large Scale Accumulo ...
Accumulo Summit 2014: Four Orders of Magnitude: Running Large Scale Accumulo ...
 
Accumulo design
Accumulo designAccumulo design
Accumulo design
 
Accumulo Summit 2015: Tracing in Accumulo and HDFS [Internals]
Accumulo Summit 2015: Tracing in Accumulo and HDFS [Internals]Accumulo Summit 2015: Tracing in Accumulo and HDFS [Internals]
Accumulo Summit 2015: Tracing in Accumulo and HDFS [Internals]
 
Accumulo meetup 20130109
Accumulo meetup 20130109Accumulo meetup 20130109
Accumulo meetup 20130109
 
Beyond tf idf why, what & how
Beyond tf idf why, what & howBeyond tf idf why, what & how
Beyond tf idf why, what & how
 
Accumulo Summit 2016: Accumulo in the Enterprise
Accumulo Summit 2016: Accumulo in the EnterpriseAccumulo Summit 2016: Accumulo in the Enterprise
Accumulo Summit 2016: Accumulo in the Enterprise
 
Large Scale Accumulo Clusters
Large Scale Accumulo ClustersLarge Scale Accumulo Clusters
Large Scale Accumulo Clusters
 
Accumulo Summit 2014: Benchmarking Accumulo: How Fast Is Fast?
Accumulo Summit 2014: Benchmarking Accumulo: How Fast Is Fast?Accumulo Summit 2014: Benchmarking Accumulo: How Fast Is Fast?
Accumulo Summit 2014: Benchmarking Accumulo: How Fast Is Fast?
 
Inside the ANN: A visual and intuitive journey to understand how artificial n...
Inside the ANN: A visual and intuitive journey to understand how artificial n...Inside the ANN: A visual and intuitive journey to understand how artificial n...
Inside the ANN: A visual and intuitive journey to understand how artificial n...
 

Similar to Introduction to Apache Accumulo

CloudCon Data Mining Presentation
CloudCon Data Mining PresentationCloudCon Data Mining Presentation
CloudCon Data Mining Presentation
Brian Johnson
 

Similar to Introduction to Apache Accumulo (20)

CloudCon Data Mining Presentation
CloudCon Data Mining PresentationCloudCon Data Mining Presentation
CloudCon Data Mining Presentation
 
An Introduction to Basics of Search and Relevancy with Apache Solr
An Introduction to Basics of Search and Relevancy with Apache SolrAn Introduction to Basics of Search and Relevancy with Apache Solr
An Introduction to Basics of Search and Relevancy with Apache Solr
 
Logging & Docker - Season 2
Logging & Docker - Season 2Logging & Docker - Season 2
Logging & Docker - Season 2
 
AWS Athena vs. Google BigQuery for interactive SQL Queries
AWS Athena vs. Google BigQuery for interactive SQL QueriesAWS Athena vs. Google BigQuery for interactive SQL Queries
AWS Athena vs. Google BigQuery for interactive SQL Queries
 
GOTO 2011 preso: 3x Hadoop
GOTO 2011 preso: 3x HadoopGOTO 2011 preso: 3x Hadoop
GOTO 2011 preso: 3x Hadoop
 
Nuxeo World Session: CMIS - What's Next?
Nuxeo World Session: CMIS - What's Next?Nuxeo World Session: CMIS - What's Next?
Nuxeo World Session: CMIS - What's Next?
 
Solr 6 Feature Preview
Solr 6 Feature PreviewSolr 6 Feature Preview
Solr 6 Feature Preview
 
What is a distributed data science pipeline. how with apache spark and friends.
What is a distributed data science pipeline. how with apache spark and friends.What is a distributed data science pipeline. how with apache spark and friends.
What is a distributed data science pipeline. how with apache spark and friends.
 
Towards a rebirth of data science (by Data Fellas)
Towards a rebirth of data science (by Data Fellas)Towards a rebirth of data science (by Data Fellas)
Towards a rebirth of data science (by Data Fellas)
 
Important work-arounds for making ASS multi-lingual
Important work-arounds for making ASS multi-lingualImportant work-arounds for making ASS multi-lingual
Important work-arounds for making ASS multi-lingual
 
NoSQL databases and managing big data
NoSQL databases and managing big dataNoSQL databases and managing big data
NoSQL databases and managing big data
 
Apache Calcite (a tutorial given at BOSS '21)
Apache Calcite (a tutorial given at BOSS '21)Apache Calcite (a tutorial given at BOSS '21)
Apache Calcite (a tutorial given at BOSS '21)
 
Data Science
Data ScienceData Science
Data Science
 
Python Generator Hacking
Python Generator HackingPython Generator Hacking
Python Generator Hacking
 
Sorry - How Bieber broke Google Cloud at Spotify
Sorry - How Bieber broke Google Cloud at SpotifySorry - How Bieber broke Google Cloud at Spotify
Sorry - How Bieber broke Google Cloud at Spotify
 
Modern data warehouse with Azure
Modern data warehouse with AzureModern data warehouse with Azure
Modern data warehouse with Azure
 
"Solr Update" at code4lib '13 - Chicago
"Solr Update" at code4lib '13 - Chicago"Solr Update" at code4lib '13 - Chicago
"Solr Update" at code4lib '13 - Chicago
 
Data Access Patterns
Data Access PatternsData Access Patterns
Data Access Patterns
 
Kubernetes - State of the Union (Q1-2016)
Kubernetes - State of the Union (Q1-2016)Kubernetes - State of the Union (Q1-2016)
Kubernetes - State of the Union (Q1-2016)
 
Gray_Compass99.ppt
Gray_Compass99.pptGray_Compass99.ppt
Gray_Compass99.ppt
 

Recently uploaded

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 

Recently uploaded (20)

Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 

Introduction to Apache Accumulo

  • 2. Introduction • Aaron Cordova • Founded Accumulo project with several others • Led development through release 1.0 • aaron@tetraconcepts.com
  • 3. Agenda • Introduction • Data Model • API • Architecture - scaling, recovery • Security • Data-lifecycle • Applications
  • 5. History • Began writing in summer of 2008, after comparing design goals with BigTable paper and existing implementations Hbase, Hypertable • Released internal version 1.0 summer of 2009. • September 2011 accepted as an Apache Incubator project. Doug Cutting, founder of Hadoop, was the Champion Sponsor • Feb 2012 1.4 Released • March 2012 graduates to a top level Apache project • V 1.5 due out soon
  • 6. Introduction • Accumulo is a sparse, distributed, sorted, multi-dimensional map • Modeled after Google’s BigTable design • Scales to trillions of records and 100s of Terabytes • Features automatic load balancing, high-availability, dynamic control over data layout
  • 8. Data Model Key Column Value row ID Timestamp Family Qualifier Visibility
  • 9. Data Model (Logical 2D table structure) attribute: attribute: purchases: returns:hat age phone sneakers bill 49 555-1212 $100 - george 38 - $80 $30
  • 10. Physical layout (sorted keys) row col fam col qual col vis time value bill attribute age public Jun 2010 49 bill attribute phone private Jun 2010 555-1212 bill purchases sneakers public Apr 2010 $100 george attribute age private Oct 2009 38 george purchases sneakers public Nov 2009 $80 george returns hat public Dec 2009 $30
  • 12. Accumulo API • To use Accumulo, must write a an application using the Accumulo Java client library. There is no SQL (hence NoSQL) • Data is packaged into Mutation objects which are added to a BatchWriter which sends them to TabletServers • Clients can scan a set of key value pairs by specifying optional start and end keys (Range) and obtaining a Scanner. Iterating over the scanner returns sorted key value pairs for that range. Each scan takes milliseconds to start. • Can scan over a subset of the columns • Can send a set of Ranges to a BatchScanner, get matching key value pairs, unsorted
  • 13. Insert row col fam col qual col vis time value bill attribute age public Jun 2010 49 bill purchases sneakers public Apr 2010 $100 george attribute age private Oct 2009 38 george purchases sneakers public Nov 2009 $80 george returns hat public Dec 2009 $30
  • 14. Insert bill attribute phone private Jun 2010 555-1212 row col fam col qual col vis time value bill attribute age public Jun 2010 49 bill purchases sneakers public Apr 2010 $100 george attribute age private Oct 2009 38 george purchases sneakers public Nov 2009 $80 george returns hat public Dec 2009 $30
  • 15. Insert row col fam col qual col vis time value bill attribute age public Jun 2010 49 bill attribute phone private Jun 2010 555-1212 bill purchases sneakers public Apr 2010 $100 george attribute age private Oct 2009 38 george purchases sneakers public Nov 2009 $80 george returns hat public Dec 2009 $30
  • 16. Scan - Full key lookup bill attribute phone private Jun 2010 row col fam col qual col vis time value bill attribute age public Jun 2010 49 bill attribute phone private Jun 2010 555-1212 bill purchases sneakers public Apr 2010 $100 george attribute age private Oct 2009 38 george purchases sneakers public Nov 2009 $80 george returns hat public Dec 2009 $30
  • 17. Scan - Single row bill row col fam col qual col vis time value bill attribute age public Jun 2010 49 bill attribute phone private Jun 2010 555-1212 bill purchases sneakers public Apr 2010 $100 george attribute age private Oct 2009 38 george purchases sneakers public Nov 2009 $80 george returns hat public Dec 2009 $30
  • 18. Scan - Multiple Rows bill - will row col fam col qual col vis time value bill attribute age public Jun 2010 49 bill attribute phone private Jun 2010 555-1212 bill purchases sneakers public Apr 2010 $100 george attribute age private Oct 2009 38 george purchases sneakers public Nov 2009 $80 george returns hat public Dec 2009 $30
  • 19. Scan - Multiple Rows, Selected Columns bill - will, fetch purchases row col fam col qual col vis time value bill attribute age public Jun 2010 49 bill attribute phone private Jun 2010 555-1212 bill purchases sneakers public Apr 2010 $100 george attribute age private Oct 2009 38 george purchases sneakers public Nov 2009 $80 george returns hat public Dec 2009 $30
  • 20. Architecture - Scaling and Recovery
  • 21. Performance Accumulo BigTable circa 2006 Cassandra • Accumulo ‘scales’ because aggregate read and write 10000 performance increase as more machines are added, and Thousands of writes per second because individual reads/write performance remains very good 1000 even with trillions of key-value pairs already in the system • Sources: http://www.slideshare.net/ acordova00/accumulo-on-ec2 100 http://techblog.netflix.com/2011/11/ benchmarking-cassandra-scalability-on.html http://static.googleusercontent.com/ external_content/untrusted_dlcp/ research.google.com/en/us/archive/bigtable- 10 osdi06.pdf 1 16 64 256 1024 Number of machines
  • 22. Accumulo Prerequisites • One to hundreds of computers with local hard drives, connected via ethernet • Password-less SSH access • Local directory for write-ahead logs • Hadoop and ZooKeeper installed, configured, and running
  • 23. Architecture Accumulo ZooKeeper HDFS MapReduce
  • 24. Architecture: HDFS HDFS NameNode DataNodes File
  • 25. Architecture: HDFS HDFS NameNode DataNodes Block 1 Block 2
  • 26. Architecture: HDFS HDFS NameNode DataNodes
  • 27. Architecture: Tables Accumulo Master Tablet Servers Table
  • 28. Architecture: Tables Accumulo Master Tablet Servers P1 P2 P3
  • 29. Architecture: Tables Accumulo Master Tablet Servers
  • 30. Architecture: Writes P1 Mem Table File1 HDFS
  • 31. Architecture: Writes P1 Mem Client Table Write-ahead Log File1 HDFS
  • 32. Architecture: Writes P1 Mem Table Write-ahead Log File1 File 2 HDFS
  • 33. Architecture: Writes P1 Mem Table X Write-ahead Log File1 File 2 HDFS
  • 34. Architecture: Splits row col fam col qual col vis time value bill attribute age public Jun 2010 49 bill attribute phone private Jun 2010 555-1212 bill purchases sneakers public Apr 2010 $100 george attribute age private Oct 2009 38 george purchases sneakers public Nov 2009 $80 george returns hat public Dec 2009 $30
  • 35. Architecture: Splits Accumulo Master Tablet Servers
  • 36. Architecture: Splits Accumulo Master Tablet Servers
  • 37. Architecture: Splits Accumulo Master Tablet Servers
  • 38. Sorted keys - dynamic partitioning • Because keys are sorted, tables can be partitioned based on the data • partitions (tablets) are uniform in size, regardless of data distribution, (as long as single rows are smaller than the partition size) • not based on the number of servers • Can add /remove / fail servers at any time, the system is always automatically balanced
  • 39. Partitioning Contrast • Some relational databases allow partitioning. May require users to choose a field or two on which to partition. Hopefully that field is uniformly distributed • Hash-based systems (default Cassandra, CouchDB, Riak, Voldemort) avoid this problem, but at the cost of range scans. Some support range scans via other means. • Many systems couple partition storage with partition service, requiring data movement to rebalance partition service (MongoDB, Cassandra, etc)
  • 40. Architecture: Reads P1 Mem Client Table Merge File1 File 2
  • 41. Architecture: Recovery Accumulo Master Tablet Servers DataNodes NameNode
  • 42. Architecture: Recovery Accumulo Master Tablet Servers DataNodes NameNode
  • 43. Architecture: Recovery Accumulo Master Tablet Servers DataNodes NameNode
  • 44. Architecture: Recovery Accumulo Master Tablet Servers DataNodes NameNode
  • 45. Architecture: Recovery Accumulo Master Tablet Servers Master reassigns DataNodes NameNode
  • 46. Architecture: Recovery Accumulo Master Tablet Servers Replay Write-ahead Log DataNodes NameNode
  • 47. Architecture: Recovery Accumulo Master Tablet Servers DataNodes NameNode
  • 48. Architecture: Recovery Accumulo Master Tablet Servers DataNodes NameNode
  • 49. Metadata Hierarchy metadata table root md1 md2 md3 user tables user1 user2 index1 index2
  • 50. Architecture: Lookup Accumulo Master Tablet Servers ZooKeeper Client
  • 51. Architecture: Lookup Accumulo Master Tablet Servers ZooKeeper Client knows zookeeper, finds root tablet Client
  • 52. Architecture: Lookup Accumulo Master Tablet Servers ZooKeeper Scan root tablet find metadata tablet that describes the user table we want Client
  • 53. Architecture: Lookup Accumulo Master Tablet Servers ZooKeeper Read location info of tablets of user table and cache it Client
  • 54. Architecture: Lookup Accumulo Master Tablet Servers ZooKeeper Read directly from server holding the tablets we want Client
  • 55. Architecture: Lookup Accumulo Master Tablet Servers ZooKeeper Find other tablets via cache lookups Client
  • 57. Security • Design and Guarantees • Data Labeling • Authentication • User Configuration
  • 58. Data Security • Accumulo will only return cells whose visibility labels are satisfied by user credentials presented at Scan time • Two necessary conditions • Correctly labeling data on ingest • Presenting right user credentials
  • 59. Security Labels Extension of BigTable data model column row ID timestamp value family qualifier visibility
  • 60. Column Visibility row col fam col qual col vis time value bill attribute age public Jun 2010 49 bill attribute phone private Jun 2010 555-1212 bill purchases sneakers public Apr 2010 $100 george attribute age private Oct 2009 38 george purchases sneakers public Nov 2009 $80 george returns hat public Dec 2009 $30
  • 61. Security Label Syntax • A & B - both A and B required • A | B - must have either A or B • (A | B) & C - must have C and A or B • A | (B & C) - must have A or both B and C • A & (B | (C & D))
  • 62. Security Label Example • Drive needs: • license&over15 • Join military: • (over17|(over16&parentConsent)) & (greencard| USCitizen) • Access to Classified data • TS&SI&(USA|GBR|NZL|CAN|AUS)
  • 63. Security Model Security Perimeter Accumulo auths data auths Trusted Client Auth Service verify ID, password, cert data User
  • 64. Trusted Client Responsibility • Ensure that credentials belong to the user • Ensure that the user is authenticated
  • 65. Application Authorization • Trusted Client applications must have max authorizations set before they can be passed • The Trusted Client limits the set of authorizations by application
  • 66. Application Authorization Example • Data may be labeled with any combination of the following: { personal, research, finance, diet, cancer } • We wish to limit certain applications to a subset
  • 67. Example Table row colF ColQ col vis value row0 name - personal|finance John row0 age - personal|research 49 row0 phone - personal|finance 555-1212 row0 owed - personal|finance $5440 row0 diagnosis - personal|(research & melanom cancer) a row0 diagnosis - personal|(research & diet) diabetes
  • 68. Application Authorizations Cancer Research: cancer diagnoses, age Diabetes Research: diet info, age Accounting System: balance, name, phone Personal Records Management: all
  • 69. Security Model Security Perimeter Accumulo Cancer Auth Service Research App ID, password, cert Researcher
  • 70. Security Model Security Perimeter Accumulo Cancer Auth Service Research App verify ID, password, cert Researcher
  • 71. Security Model Security Perimeter Accumulo research, cancer, diabetes Cancer Auth Service Research App verify ID, password, cert Researcher
  • 72. Security Model Security Perimeter Accumulo research, cancer Cancer Auth Service Research App ID, password, cert Researcher
  • 73. Security Model Security Perimeter Accumulo research, data cancer Cancer Auth Service Research App ID, password, cert Researcher
  • 74. Security Model Security Perimeter Accumulo research, data cancer Cancer Auth Service Research App ID, password, cert data Researcher
  • 76. Data Model Key Column Value row ID Timestamp Family Qualifier Visibility
  • 77. Versions What can we do with multiple versions of the same data? rowID family qualifier timestamp value row1 fam1 qual1 1005 2 row1 fam1 qual1 1004 5 row1 fam1 qual1 1003 3 row1 fam1 qual1 1002 2 row1 fam1 qual1 1001 7
  • 78. Iterators • Mechanism for adding online functionality to tables • Aggregation (called Combiners) • Age-Off • Filtering (including by security label)
  • 79. Versioning Iterators rowID family qualifier timestamp value row1 fam1 qual1 1005 2 row1 fam1 qual1 1004 5 row1 fam1 qual1 1003 3 row1 fam1 qual1 1002 2 row1 fam1 qual1 1001 7
  • 80. Filtering Iterators • Age Off • RegEx • Arbitrary filtering
  • 81. Age Off • Can specify a particular date - e.g. delete everything older than July 1, 2007 • Can specify a time period - e.g. delete everything older than 6 months
  • 82. Age-Off Current Time: 1103 rowID family qualifier timestamp value row1 fam1 qual1 1005 2 K/V pair is more than row1 fam1 qual1 1004 5 100 sec. old row1 fam1 qual1 1003 3 row1 fam1 qual1 1002 2 row1 fam1 qual1 1001 7
  • 83. Age-Off Current Time: 1104 rowID family qualifier timestamp value K/V pair is more than row1 fam1 qual1 1005 2 100 sec. old row1 fam1 qual1 1004 5 row1 fam1 qual1 1003 3 row1 fam1 qual1 1002 2 row1 fam1 qual1 1001 7
  • 84. Age-Off Current Time: 1105 K/V pair is more than rowID family qualifier timestamp value 100 sec. old row1 fam1 qual1 1005 2 row1 fam1 qual1 1004 5 row1 fam1 qual1 1003 3 row1 fam1 qual1 1002 2 row1 fam1 qual1 1001 7
  • 85. Manual Deletes • Can insert ‘deletes’. They are inserted like other key-value pairs, any keys with an older timestamp is suppressed from reads • Compactions write non-deleted data to new files • Old files are then removed from HDFS • To ensure data is deleted from disk, • write deletes (they are now absent from query results) • compact (can compact a particular range of a table if it’s large)
  • 86. Garbage Collection • Garbage collector compares the files in HDFS with the set of files currently active • When files are no longer on the active list, GC waits for a while, then deletes from HDFS
  • 87. Applications • Fast lookups / scan on extremely large tables with flexible schemas, varying security • Large index across heterogeneous data sets • Continuous Summary Analytics via Iterators • Secure Storage of key value pairs for MapReduce jobs
  • 88. Where does your data come from? • BigTable was designed to store data for web applications serving millions of users. Web application creates all the data. Many NoSQL databases are designed solely for this purpose. Accumulo can certainly support that. • However, many organizations have lots of data from various sources. Different schema, different security levels. Bringing them together for analysis is very valuable. Accumulo can support this too.
  • 89. Indexing and queries • BigTable data model supports building a wide variety of indexes • Simple strings, numbers, geo points, ip addresses, etc • Each has to be coupled with query code • New applications should examine their data access use cases, indexes and query code to accomplish those can then be written • Best applications are constructed so each user request is a single scan, or a small number of scans
  • 90. Compared to MapReduce • Hadoop’s HDFS stores simple files. Usually unsorted. • MapReduce is designed to process all or most of the files at once. • Accumulo maintains a set of sorted files in HDFS • Accumulo scans are designed to access a small portion of the data quickly. • Fairly complementary
  • 91. Tough use case • Ran MapReduce on some input data set to create a large result set. • Now have a few new records, want to update the result set • MapReduce has to process all the data again, have to wait • Accumulo allows users to perform a limited set of operations to update a result set incrementally, using Iterators • Result sets are always up to date, immediately after insert
  • 92. Combiners row col fam col qual col vis time value bill perf June_calls P June 1 9 bill perf June_calls P June 4 3 bill perf July_calls P July 3 4 bill perf July_calls P July 11 7 bill perf August_calls P Aug 12 5 bill perf August_calls P Aug 29 2
  • 93. Combiners row col fam col qual col vis time value bill perf June_calls P - 12 bill perf July_calls P - 11 bill perf August_calls P - 7
  • 94. Combiners • Almost equivalent to Reduce of MapReduce except: • Cannot assume we have seen all the values for a particular key • Exactly equivalent to a Combiner function
  • 95. Combiners • Useful Combiners: • Event count (StringSummation or LongSummation aggregator) • Event hour occurrence histogram (NumArraySummation aggregator) • Event duration histogram (NumArraySummation aggregator)
  • 97. Edge table row col fam col qual col vis time value a edge f 1.0 c edge b 1.0 c edge d 1.0 d edge b 1.0 d edge e 1.0 e edge d 1.0 f edge g 1.0 g edge e 1.0 g edge f 1.0
  • 98. Edge Weights • Summing Combiners are typically used to efficiently and incrementally update edge weights • See SummingCombiner
  • 99. Edge table Incoming: a, edge, f, 1.0 row col fam col qual col vis time value a edge f 1.0 c edge b 1.0 c edge d 1.0 d edge b 1.0 d edge e 1.0 e edge d 1.0 f edge g 1.0
  • 100. Edge table row col fam col qual col vis time value a edge f 2.0 c edge b 1.0 c edge d 1.0 d edge b 1.0 d edge e 1.0 e edge d 1.0 f edge g 1.0
  • 101. Edge table Incoming: c, edge, b, 6.0 row col fam col qual col vis time value a edge f 2.0 c edge b 1.0 c edge d 1.0 d edge b 1.0 d edge e 1.0 e edge d 1.0 f edge g 1.0
  • 102. Edge table row col fam col qual col vis time value a edge f 2.0 c edge b 7.0 c edge d 1.0 d edge b 1.0 d edge e 1.0 e edge d 1.0 f edge g 1.0
  • 103. Edge table Incoming: a, edge, f, 2.3 row col fam col qual col vis time value a edge f 2.0 c edge b 7.0 c edge d 1.0 d edge b 1.0 d edge e 1.0 e edge d 1.0 f edge g 1.0
  • 104. Edge table row col fam col qual col vis time value a edge f 4.3 c edge b 7.0 c edge d 1.0 d edge b 1.0 d edge e 1.0 e edge d 1.0 f edge g 1.0
  • 105. Edge Table Applications • Graph Analytics - traversal, neighbors, connected components • Neighborhood = feature vector. Vector-based machine learning techniques. Nearest neighbor search, clustering, classification • Automated dossiers, fact accumulation - ‘tell me everything we know about X’ in a single scan • Find entities based on features - ‘show me everyone who has feature value > x’ or ‘with < 5 neighbors of type k’
  • 106. RDF Triples row col fam col qual col vis time value DC is_capital_of USA 1.0 Don vacations_in Arctic 7.0 Don is_employed_by MI6 1.0 Sean has_status “007” 1.0 Sean starred_with Ursula 1.0 Sean starred_with Anya 0.7 Sean starred_with Teresa 0.3
  • 107. RDF Triples - RYA • See RYA project : http://www.usna.edu/Users/cs/adina/research/ Rya_CloudI2012.pdf
  • 109. Additional Training • Talked about the basics today • 3 days of developer training with hands on examples covering • installation, configuration, read / write API, MapReduce, security, table configuration, indexing specific types, querying index tables, combiners, custom iterators, table constraints, storing relational data, joins, high performance considerations, document-partitioned indexing (text search), machine learning, object persistence • 2 days of administrator training covering • hardware selection, process assignment, troubleshooting, maintenance, replication and high availability, cluster modification, failure handling
  • 110. Next Scheduled Training Sessions • March 5-7 Columbia MD • April 9-11 Columbia MD • http://www.tetraconcepts.com/training • aaron@tetraconcepts.com • brian@tetraconcepts.com