HBase
                     (        )



Ameba Technology Laboratory
•                 (                  )

•   27

•
                             Ameba Technology Laboratory
    (             4      )

•
•       Twitter       @brfrn169
•   HBase
•
•
    -       MySQL

        ➡           (   )

        ➡
•
    -           MySQL

        ➡               (   )

        ➡

            HBase
Goals

•
•        (      )

•

•
    -
    -
Non-Goals
•   (      )
•
                          follow
                                    date             2011/1/3


                  1                                                                2
                                                                            name       Yasuda Masahiro

name   Suzuki Toshihiro                                                     age                26

age          27
                           friends
                                              date              2011/4/12




                          friends
                             date          2011/4/12

                                                                                   3
                                                                            name   Fukuda Ichiro

                                                                            age           28
•   HBase + Gateway(Java)

                      Client
                               RPC


        Gateway      Gateway   Gateway


                      HBase
                      HDFS
Row Key
•   Row Key : [srcNodeId + type + direction]

•   Column Family : “g”

•   Column : destNodeId

•   Value : Properties
Row Key

              2
1




          3
Row Key

       FOLLOW              2
1       date   2011/1/12




               3
Row Key
Row Key      Column Key   Value
Row Key
      Row Key         Column Key        Value
“1,FOLLOW,OUTGOING”       g:2      date=2011/1/12
“2,FOLLOW,INCOMING”       g:1      date=2011/1/12
Row Key

       FOLLOW              2
1       date   2011/1/12




               3
Row Key

       FOLLOW                       2
1       date   2011/1/12




                           FOLLOW
                             date   2011/2/9




               3
Row Key
      Row Key         Column Key        Value
“1,FOLLOW,OUTGOING”       g:2      date=2011/1/12
“2,FOLLOW,INCOMING”       g:1      date=2011/1/12
Row Key
      Row Key         Column Key        Value
“1,FOLLOW,OUTGOING”       g:2      date=2011/1/12
“2,FOLLOW,INCOMING”       g:1      date=2011/1/12
“2,FOLLOW,OUTGOING”       g:3      date=2011/2/9
“3,FOLLOW,INCOMING”       g:2      date=2011/2/9
Row Key

       FOLLOW                       2
1       date   2011/1/12




                           FOLLOW
                             date   2011/2/9




               3
Row Key

       FOLLOW                          2
1        date     2011/1/12




     FOLLOW
       date     2011/4/20     FOLLOW
                                date   2011/2/9




                3
Row Key
      Row Key         Column Key        Value
“1,FOLLOW,OUTGOING”       g:2      date=2011/1/12
“2,FOLLOW,INCOMING”       g:1      date=2011/1/12
“2,FOLLOW,OUTGOING”       g:3      date=2011/2/9
“3,FOLLOW,INCOMING”       g:2      date=2011/2/9
Row Key
      Row Key         Column Key        Value
“1,FOLLOW,OUTGOING”       g:2      date=2011/1/12
                          g:3      date=2011/4/20
“2,FOLLOW,INCOMING”       g:1      date=2011/1/12
“2,FOLLOW,OUTGOING”       g:3      date=2011/2/9
“3,FOLLOW,INCOMING”       g:1      date=2011/4/20
                          g:2      date=2011/2/9
Row Key
      Row Key         Column Key        Value
“1,FOLLOW,OUTGOING”       g:2      date=2011/1/12
                          g:3      date=2011/4/20
“2,FOLLOW,INCOMING”       g:1      date=2011/1/12
“2,FOLLOW,OUTGOING”       g:3      date=2011/2/9
“3,FOLLOW,INCOMING”       g:1      date=2011/4/20
                          g:2      date=2011/2/9
Row Key
•   Define Graph

    -
    -               Row Key
•        DB HBase



•   FB   FB
•

HBaseでグラフ構造を扱う(開発中)

  • 1.
    HBase ( ) Ameba Technology Laboratory
  • 2.
    ( ) • 27 • Ameba Technology Laboratory ( 4 ) • • Twitter @brfrn169
  • 3.
    HBase
  • 4.
  • 5.
    - MySQL ➡ ( ) ➡
  • 6.
    - MySQL ➡ ( ) ➡ HBase
  • 7.
    Goals • • ( ) • • - -
  • 8.
  • 9.
    follow date 2011/1/3 1 2 name Yasuda Masahiro name Suzuki Toshihiro age 26 age 27 friends date 2011/4/12 friends date 2011/4/12 3 name Fukuda Ichiro age 28
  • 10.
    HBase + Gateway(Java) Client RPC Gateway Gateway Gateway HBase HDFS
  • 11.
    Row Key • Row Key : [srcNodeId + type + direction] • Column Family : “g” • Column : destNodeId • Value : Properties
  • 12.
    Row Key 2 1 3
  • 13.
    Row Key FOLLOW 2 1 date 2011/1/12 3
  • 14.
    Row Key Row Key Column Key Value
  • 15.
    Row Key Row Key Column Key Value “1,FOLLOW,OUTGOING” g:2 date=2011/1/12 “2,FOLLOW,INCOMING” g:1 date=2011/1/12
  • 16.
    Row Key FOLLOW 2 1 date 2011/1/12 3
  • 17.
    Row Key FOLLOW 2 1 date 2011/1/12 FOLLOW date 2011/2/9 3
  • 18.
    Row Key Row Key Column Key Value “1,FOLLOW,OUTGOING” g:2 date=2011/1/12 “2,FOLLOW,INCOMING” g:1 date=2011/1/12
  • 19.
    Row Key Row Key Column Key Value “1,FOLLOW,OUTGOING” g:2 date=2011/1/12 “2,FOLLOW,INCOMING” g:1 date=2011/1/12 “2,FOLLOW,OUTGOING” g:3 date=2011/2/9 “3,FOLLOW,INCOMING” g:2 date=2011/2/9
  • 20.
    Row Key FOLLOW 2 1 date 2011/1/12 FOLLOW date 2011/2/9 3
  • 21.
    Row Key FOLLOW 2 1 date 2011/1/12 FOLLOW date 2011/4/20 FOLLOW date 2011/2/9 3
  • 22.
    Row Key Row Key Column Key Value “1,FOLLOW,OUTGOING” g:2 date=2011/1/12 “2,FOLLOW,INCOMING” g:1 date=2011/1/12 “2,FOLLOW,OUTGOING” g:3 date=2011/2/9 “3,FOLLOW,INCOMING” g:2 date=2011/2/9
  • 23.
    Row Key Row Key Column Key Value “1,FOLLOW,OUTGOING” g:2 date=2011/1/12 g:3 date=2011/4/20 “2,FOLLOW,INCOMING” g:1 date=2011/1/12 “2,FOLLOW,OUTGOING” g:3 date=2011/2/9 “3,FOLLOW,INCOMING” g:1 date=2011/4/20 g:2 date=2011/2/9
  • 24.
    Row Key Row Key Column Key Value “1,FOLLOW,OUTGOING” g:2 date=2011/1/12 g:3 date=2011/4/20 “2,FOLLOW,INCOMING” g:1 date=2011/1/12 “2,FOLLOW,OUTGOING” g:3 date=2011/2/9 “3,FOLLOW,INCOMING” g:1 date=2011/4/20 g:2 date=2011/2/9
  • 25.
    Row Key • Define Graph - - Row Key
  • 26.
    DB HBase • FB FB
  • 27.