Treasure Data


 http://d.hatena.ne.jp/naoya/20130219/1361262854 Treasure Data 


 Treasure Data (TD)  Yahoo!  Jerry Yang Fluentd 

 Treasure Data 

Treasure Data が提供するサービス


TDSQL  MapReduce 

TD amazlet TDOSX tdTD
% td tables nginx
+----------+--------+------+---------+--------+---------------------------+--------+
| Database | Table  | Type | Count   | Size   | Last import               | Schema |
+----------+--------+------+---------+--------+---------------------------+--------+
| nginx    | access | log  | 2649812 | 0.1 GB | 2013-03-22 17:01:57 +0900 |        |
+----------+--------+------+---------+--------+---------------------------+--------+



amazlet  Amazon 
% td query -w -d nginx "select v['asin'] as asin, count(1) as cnt from access group by v['asin'] order by cnt desc limit 100"

td SQL () 
Job 2131709 is queued.
Use 'td job:show 2131709' to show the status.
queued...
  started at 2013-03-22T08:07:49Z
  Hive history file=/mnt/hive/tmp/1624/hive_job_log__1111533064.txt
  Total MapReduce jobs = 2
  Launching Job 1 out of 2
  Number of reduce tasks not specified. Defaulting to jobconf value of: 12
  In order to change the average load for a reducer (in bytes):
    set hive.exec.reducers.bytes.per.reducer=<number>
  In order to limit the maximum number of reducers:
    set hive.exec.reducers.max=<number>
  In order to set a constant number of reducers:
    set mapred.reduce.tasks=<number>
  Starting Job = job_201301150013_218289, Tracking URL = …
  2013-03-22 08:08:18,702 Stage-1 map = 0%,  reduce = 0%
  2013-03-22 08:08:26,779 Stage-1 map = 26%,  reduce = 0%
  2013-03-22 08:08:29,814 Stage-1 map = 41%,  reduce = 0%
  2013-03-22 08:08:32,858 Stage-1 map = 58%,  reduce = 0%
  2013-03-22 08:08:35,907 Stage-1 map = 72%,  reduce = 0%
  2013-03-22 08:08:38,935 Stage-1 map = 83%,  reduce = 0%

 MapReduce OSX MapReduce !


| B00BHAF688 | 307 | ⇒ ジョジョ (PlayStation 3)
| B00BHO0FK8 | 274 | ⇒ Evangelion Q の Blu-ray
| B009GSX0A4 | 147 | ⇒ 閃乱カグラ (PSP Vita)
| B00A64CFIK | 136 | ⇒ 初音ミク (PlayStation 3)
| B00APVDHLI | 134 | ⇒ ジョジョ (PlayStation 3)
| B0095D6I86 | 128 | ⇒ メタルギア ライジング (PlayStation 3)
| B00BIYSEFA | 123 | ⇒ 真・女神転生IV (Nintendo 3DS)
| B00AHA5OCC | 113 | ⇒ SOUL SACRIFICE (PlayStaion 3)
| B00BIYSF7C | 112 | ⇒ サモンナイト5

 amazlet 使 PS3  Blu-ray  MapReduce  I/O  CPU 

MB Treasure Data  MySQL  MongoDB  GBTB

 Hadoop  Hive TD MapReduce  Hadoop SQL  (HiveQL)  Hadoop  Hive使 Hadoop + Hive  API TD SQL  MapReduce

 Treasure Data 

実際どんな場面で使われるのか


 SQL 使?

WebTD使使 MobFox 

?

Apache  access_logPVUU Google Analytics 使HTTP

URLUUID調調




# 商品購入画面
post '/purchase'  => sub {
    my $self = shift;
    my $item = My::Item->find(…);
    my $user = My::User->purchase( $item );
    
    # インタラクションログを出力する
    $self->logger->emit(
        user_hash => $user->hash,
        age => $user->age,
        sex => $user->sex,
        session => $user->session_id,
        item => $item->id,
        …   
    );
    
    $self->render;
};

%使A/B 




?

?

?

?

?


GBMySQL? MongoDB? !!!! MySQL  alter table ?!!



 Zynga 

WebB2C () ERM  SCM  DWH () 

 Hadoop 

31
2FacebookTwitter2


 DWH  Teradata  CTO ()

AWS Treasure Data 

Treasure Data のアーキテクチャ (ざっくり)


 Treasure Data 

  JAWS DAYS 2013  @repeatedly 

http://cdn.bloghackers.net/images/20130322_184841.png
Treasure Data  OSS  Fluentd  OSS  Fluentd Treasure Data 使 td-agent (https://github.com/treasure-data/td-agent) 使API TDFluentd () LINE 使 JSON  Fluentd 

TD使 S3 99.999999999%  99.99%  S3 HDFS (+ )S3  I/O 

 Hive + HadoopHadoop 

TDWeb API  MySQL  S3  BI (Business Intelligence) TD


Treasure Data vs ...


Bigdata as a Service  Treasure Data TD Amazon AWS*1 


Amazon Elastic MapReduce (EMR)

Amazon Redshift



EMR  AWS  MapReduce Hive 使S3  MapReduce Redshift  DWH 

 Treasure Data ?

 EMR  Redshift 使 Treasure Data  API  AWS  HerokuDWH ! Treasure Data 

TD の使用感


TD使TD

 http://d.hatena.ne.jp/naoya/20130219/1361262854 TD使 API  API  Restful 

 Fluentd 使2 S3 TD使

どんな風にみえているか


Treasure Data 

WebDWH Treasure Data  Hadoop  Treasure Data 使

 AWS TD (DWH) 4 1,000  Instagram  AWS TD

 Treasure Data 

 Treasure Data  CTO  @kzk_mover 使

TD (!) 寿稿

*1:若干書き方が紛らわしいですがTDがEMRやRedshiftをバックエンドにしているわけではないです。TDはAWSのうちS3、ERB、EC2、RDS程度のみ利用しているとのこと