Agile Cat — in the cloud

March 25, 2010

Hadoop: Cloudera が CDH2 のプロダクションと、CDH3 の Beta1 をリリース

Filed under: Cloudera,Hadoop — Agile Cat @ 6:02 pm
Tags: , , , ,

Hadoop: CDH2 is released / CDH3 Beta 1 Now Available
http://www.cloudera.com/blog/2010/03/cdh2-is-released/
http://www.cloudera.com/blog/2010/03/cdh3-beta1-now-available/

Cloudera

昨年の秋最初のアナウンスがあった、Apache Hadoop 0.20 ベースの CDH2 がオフシャルにリリースされたとのことです。 Apache Hadoop コミュニティがバグ・フィックスなどで頑張り、機能が改善されたと書かれています。 CDH2 のリリースノートは、ココです。

さらにですが、CDH3 の Beta 1 も同時にリリースされまた。 こちらも、基本的に Apache Hadoop 0.20 がベースですが、信頼性とパフォーマンスが改善された Pig パッケージと、Apache の最新リリースに基づいた Hive のパッケージが含まれるとのことです。また、HBaseZookkeper が contrib repository から first class packages に昇格し、Yahoo! からのセキュリティに関するコントリビューションも含まれるようです。

ーーーーーー

先週と、今週と、Cloudera からのアナウンスが目白押しですね。 あの人数で、ほんと 頑張っていますね。 ーーー A.C.

<関連>
カテゴリ Cloudera:http://agilecat.wordpress.com/category/cloudera/
カテゴリ Hadoop:http://agilecat.wordpress.com/category/hadoop/

 

Hadoop による Web 広告システムの構築と運用 :ヨーロッパでの事例_3

Filed under: Cloudera,Hadoop,MapReduce — Agile Cat @ 9:52 am
Tags: , , , , , ,

Why Europe’s Largest Ad Targeting Platform Uses Hadoop_3
by Ed Albanese March 10, 2010
http://www.cloudera.com/blog/2010/03/why-europes-largest-ad-targeting-platform-uses-hadoop/

Cloudera

Development Begins

In June 2009 we started to develop a full solution. At this point certain external factors played a very helpful role in our development. One was the publication of the book “Hadoop: The Definitive Guide” by Tom White, which helped us to understand how we could use Hadoop. The other was the emergence of a dynamic programming language called Clojure, which compiles directly to JVM byte code.

そして、2009年 6月には、すべてのソリューションの再開発に着手しました。 そのとき、Tom White による “Hadoop: The Definitive Guide” が出版されるという、私たちの Hadoop への理解を推進する出来事がありました。また、JVM バイトコードへとダイレクトにコンパイルする、Clojure と呼ばれるダイナミック・プログラム言語も出現しました。

After one month of development we were able to create our reports using Hadoop with our processing times going from five days to one hour. This was great for building confidence in our decision. For the following four months we progressively turned features off in the old data warehouse as they became available in Hadoop. By October 2009 we had completed the migration and also additional new features previously impossible to run. In the next section I will briefly explain how it actually works.

1ヶ月の開発期間の後に、Hadoop を用いたレポート生成が可能になりましたが、その処理時間が 5日間から 1時間に短縮されたのです。それにより、私たちの判断に大きな自信が生まれてきました。それから 4ヶ月の間に、漸進的に Hadoop へと機能を移行し、古いデータウエア・ハウスを停止していきました。 そして 2009年10月には完全な移行を達成した上に、それまでは実現できなかった新しい機能を付け加えました。 次のセクションでは、私たちが行ってきたことを簡潔に説明していきます。

A Closer Look at our Hadoop Setup

Our cluster is located in one of our data centers and contains commodity machines with a total of 36 cores and 8 TB of disk space. The machines were provisioned using Chef from Opscode.com and we use the Cloudera CDH1 distribution.

私たちのデータセンターの1つに、このクラスタは配置されており、合計で 36コアの CUPと 8TB のディスク・スペースを有する、コモディティ・マシンで構成されています。それらのマシンでは、Cloudera CDH1 ディストリビューションを採用し、Opscode.com の Chef を用いたプロビジョニングを行っています。

The log files are now copied to the HDFS. In order to make sense of our data we need it summarized by hours, days and weeks. Therefore, we organize our HDFS directory structure hierarchically by date to reflect this requirement. The path for handling days and hours follows the structure /event/years/months/days/hours. This way we can use simple file globs for a MapReduce job input file configuration.

現時点において、ログ・ファイルは HDFS にコピーされています。 私たちのデータの意味を理解するためには、時間/日/週のレベルでの処理が必要になります。 したがって、こうした要件を反映するために、HDFS ディレクトリ階層構造を、日付を用いて構成するようにしました。「日」 や 「時間」 を取り扱うパスは、/event/years/months/days/hours という順に並びます。 そうすることで、MapReduce ジョブ入力ファイル・コンフィグレーションのための、シンプルで細かく分類されたファイルを利用できます。

We wrote our own simple scheduler querying the HDFS to see, if input is available to create missing output. When it cannot find the output a configuration is created containing input and output path which is sent to our MapReduce server.

また、出力を達成できないような入力が存在するのかどうか、その点を確認するために、HDFS に対するシンプルでスケジューリングされたクエリーを記述しました。 そして、出力が見つからない時には、MapReduce サーバーに送信する入出力パスを含んだ、コンフィグレーションを作成するようにしました。

The MapReduce server provides a JSON HTTP API for starting, querying and stopping jobs. It supports both scheduled and on-demand jobs. When the server receives a request to run a job, the event name is used to locate the associated chain of one or more Hadoop jobs to run. A unique identifier is returned which can be later used to query or stop the job.

私たちの MapReduce サーバーは、ジョブの始動/クエリー/停止のために、JSON HTTP API を提供します。そこでは、スケジュールされたジョブと、オンデマンドのジョブの双方がサポートされます。ジョブ実行のリクエストをサーバーが受信するときには、関連して実行される他の Hadoop ジョブを指し示すために、イベントの名称が用いられます。そして、後にジョブに対するクエリーや停止のための使用される、ユニークな ID が返されます。

An example is the chain of events to run one of our daily reports. Customer-wise it contains a summary of page impressions and unique clients for each socio-demographic and product interest prediction our online platform produces. Therefore, we first fetch information stored in our customer database and add this to the distributed cache. The MapReduce phase sums up the page impressions for each user and counts the number of client ids for each prediction and possible outcome e.g. age class 30-39. The final phase is to perform a reduce side join where the internal customer ids are translated to account manager readable information by accessing the data previously stored in the distributed cache.

例として、私たちのデイリー・レポートの、一部を実行するイベントの連鎖があります。 顧客の観点からすると、そこには、私たちのオンライン・プラットフォームが作り出す、それぞれの製品への興味と購買層の予測に関する、ページ・インプレッションと個々のクライアントのサマリーが含まれます。 したがって、顧客データベースにストアされた情報を最初にフェッチし、それを分散キャッシュに加えていきます。 MapReduce フェーズでは、それぞれのユーザーごとのページ・インプレッションを加算し、個々の予測と可能性の結果(age class 30-39 など)ごとに、クライアント ID の数を数えていきます。 最終フェーズとして、以前に分散キャッシュにストアされたデータにアクセスします。そして、内部情報である顧客 ID を、アカウント・マネージャーが読める情報に変換する、Reduce サイドの join を実行します。

At a later point we intend to use the MapReduce server API to build a web based interface fitting our purposes.

今後ですが、この目的に適してた Web ベースのインターフェイスを構築するために、MapReduce サーバー API を使うつもりです。

Frequently-run jobs are implemented in Clojure and Java using the Hadoop MapReduce API with a number of performance optimizations. These are:

頻繁に実行されるジョブは、Hadoop MapReduce API を用いて Clojure と Java で実装されますが、数多くのパフォーマンスの最適化をともないます。

• Compress map output to LZO, mainly to reduce disk IO during the shuffle phase
• Apply a Combiner to perform initial aggregation before the data arrives at the reducer
• Use our own developed Writable types which are written to be RawComparators
• Add type hints with Clojure code to avoid the overhead of reflection

• Map 出力を LZO に圧縮し、主として Shuffle フェーズのディスク I/O を低減。
• データが Reducer に到着する前に、最初のアグリゲーションを実行するために Combiner を適用。
• RawComparators になるように記述された、独自開発の Writable types を使用。
• リフレクションのオーバーヘッドを回避するために、Clojure を用いた type hints を追加。

Also we use tools like Pig to run ad hoc reports as well as streaming jobs e.g. to grep the contents of the web servers logs.

さらに、アドホックなレポートを実行するための、Pig のようなツールを使うだけではなく、たとえば、Web サーバー・ログのコンテンツを grep するための、ストリーミング・ジョブも利用します。

Spreadsheets are often used by our statisticians and account managers as a tool to analyze data. Therefore, we wrote an OutputFormat class which generates Excel work books with a number of sheets summarizing customer data.

統計学者とアカウント・マネージャーが実施する、データ分析のツールとして、スプレッドシートが頻繁に使用されます。 そのため、顧客データを要約する多数のシートを用いた、Excel ワークブックを生成するための、OutputFormat クラスを記述しました。

<続く>

ーーーーー

次は最終回で~~~す ーーー A.C.

<関連>

Hadoop による Web 広告システムの構築と運用 :ヨーロッパでの事例_1
Hadoop による Web 広告システムの構築と運用 :ヨーロッパでの事例_2
Hadoop による Web 広告システムの構築と運用 :ヨーロッパでの事例_3
Hadoop による Web 広告システムの構築と運用 :ヨーロッパでの事例_4

Windows Azure Toolkit for Facebook の提供が開始に!

Filed under: Facebook,Microsoft — Agile Cat @ 7:12 am
Tags: , , , , , , , ,

Windows Azure Toolkit for Facebook Now Available
http://blogs.msdn.com/windowsazure/archive/2010/03/24/windows-azure-toolkit-for-facebook-now-available.aspx

image

One of the exciting announcements we made last week at SXSW Interactive 2010 was the release of the Windows Azure Toolkit for Facebook. This new toolkit, built by Thuzi in collaboration with Microsoft, enables developers to rapidly develop Facebook applications on Windows Azure.

先週に開催された SXSW Interactive 2010 で、私たちは Windows Azure Toolkit for Facebook のリリースという、とてもエキサイティングな発表を行った。 この新しいツールキットは、 Microsoft と Thuzi の協調により構築され、Windows Azure 上での Facebook アプリケーションを、素早く開発できるようにする。

Facebook Azure

To see the toolkit in action, check out Thuzi.com CTO Jim Zimmerman’s session, Facebook Apps in Windows Azure, at Mix10 last week where he showcased live Facebook applications for Outback Steakhouse and CloudPoll that were both built using the Windows Azure Toolkit for Facebook.

このツールキットを活用するには、先週の Mix10 における Thuzi.com CTO – Jim Zimmerman のセッションである、Facebook Apps in Windows Azure を参照してほしい。そこでは、実際に Windows Azure Toolkit for Facebook を用いて構築された、Outback Steakhouse と CloudPoll の Facebook アプリケーションが紹介されている。

The toolkit includes:

To get started, you’ll need to:

Let us know what you think by posting a comment to this post; how are you planning to use the toolkit and what additional resources do you need to get started?  As always, we look forward to hearing from you.

このポストへのコメントにより、あなたの印象を知らせてほしい。 このツールキットを用いて、何をプランニングするのか? そして、どのような追加リソースが、必要なのだろうか?  いつもと同様に、私たちはフィードバックを楽しみにしている。

Published Wednesday, March 24, 2010 6:05 PM by WindowsAzure

ーーーーー

お次は、Windows Azure Toolkit for Twitter でしょうかね? ーーー A.C.

March 24, 2010

Google の中国撤退声明文:対訳

Filed under: Google,Miscs — Agile Cat @ 8:17 am
Tags: , , , ,

A new approach to China: an update
3/22/2010 12:03:00 PM
http://googleblog.blogspot.com/2010/03/new-approach-to-china-update.html

google official

On January 12, we announced on this blog that Google and more than twenty other U.S. companies had been the victims of a sophisticated cyber attack originating from China, and that during our investigation into these attacks we had uncovered evidence to suggest that the Gmail accounts of dozens of human rights activists connected with China were being routinely accessed by third parties, most likely via phishing scams or malware placed on their computers. We also made clear that these attacks and the surveillance they uncovered—combined with attempts over the last year to further limit free speech on the web in China including the persistent blocking of websites such as Facebook, Twitter, YouTube, Google Docs and Blogger—had led us to conclude that we could no longer continue censoring our results on Google.cn.

私たちは 1月12日に、このブログで、Google と20社以上のアメリカ企業が、中国を本拠とする狡猾なサイバー攻撃の被害にあっていることを発表しました。そして、これらの攻撃について調査している期間において、中国に縁故のある多数の人権擁護運動家の Gmail アカウントが、第三者のコンピュータ上に配置されたフィッシング・スキャンやマルウェアなどにより、定期的にアクセスされていたことを示唆する証拠を公表しました。 そして私たちは、それらの攻撃と監視について、中国政府が公表したことについても明らかにしました。それは、Facebook や、Twitter、YouTube、Google Docs、Blogger といった Web サイトで執拗なブロッキングを含む、中国における Web 上での言論統制の試みと関連するものです。そして、もはや Google.cn における結果の検閲を、私たちは継続できない、という結論に至ったのです。

So earlier today we stopped censoring our search services—Google Search, Google News, and Google Images—on Google.cn. Users visiting Google.cn are now being redirected to Google.com.hk, where we are offering uncensored search in simplified Chinese, specifically designed for users in mainland China and delivered via our servers in Hong Kong. Users in Hong Kong will continue to receive their existing uncensored, traditional Chinese service, also from Google.com.hk. Due to the increased load on our Hong Kong servers and the complicated nature of these changes, users may see some slowdown in service or find some products temporarily inaccessible as we switch everything over.

そして今朝のことですが、Google.cn 上の Google Search、Google News、Google Images といった検索サービスについて、私たちは検閲を停止しました。 Google.cn を訪れるユーザーは、Google.com.hk にリダイレクトされ、無検閲の簡体中国語による検索を提供されます。それは、中国本土のユーザーを対象とした、私たちの Hong Kong サーバーを介して提供されるサービスです。Hong Kong のユーザーも同様に、Google.com.hk から提供される、これまでの無検閲の中国語サービスを受け続けるでしょう。 すべてを切り替える際の、Hong Kong サーバーにおける負荷の増大と、一連の変更に関する複雑な交渉により、いくつかのサービスでスローダウンが生じ、いくつかのプロダクトが一時的にアクセスできない状況になるかもしれません。

Figuring out how to make good on our promise to stop censoring search on Google.cn has been hard. We want as many people in the world as possible to have access to our services, including users in mainland China, yet the Chinese government has been crystal clear throughout our discussions that self-censorship is a non-negotiable legal requirement. We believe this new approach of providing uncensored search in simplified Chinese from Google.com.hk is a sensible solution to the challenges we’ve faced—it’s entirely legal and will meaningfully increase access to information for people in China. We very much hope that the Chinese government respects our decision, though we are well aware that it could at any time block access to our services. We will therefore be carefully monitoring access issues, and have created this new web page, which we will update regularly each day, so that everyone can see which Google services are available in China.

Google.cn 上で無検閲のサービスを提供するために、私たちが約束すべきことを見つけ出すのは、難しいことでした。自己検閲が交渉不可能な法律要件であるという、私たちの考え方について、中国政府は認めていませんが、それでもなお、世界中の人々と同じレベルで、中国本土でも、私たちのサービスへアクセスできることを望みます。 私たちは、Google.com.hk からの簡体中国語による、無検閲の検索の提供という新しいアプローチが、直面している困難な課題に対する、思慮深いソリューションになると信じています。それは、完全に合法的であり、中国の人々にとって意味のある情報に対する、アクセスを増やしていくでしょう。私たちは、いつでもサービスへのアクセスがブロックされることを認識していますが、こうした判断を中国政府が尊重してほしいと望みます。 したがって、私たちはアクセスの問題を慎重にモニターするでしょう。そして、毎日更新していく、新しい Web ページを作成しました。 それにより、Google サービスが中国で利用できることを、皆さんに認識して欲しいと思っています。

In terms of Google’s wider business operations, we intend to continue R&D work in China and also to maintain a sales presence there, though the size of the sales team will obviously be partially dependent on the ability of mainland Chinese users to access Google.com.hk. Finally, we would like to make clear that all these decisions have been driven and implemented by our executives in the United States, and that none of our employees in China can, or should, be held responsible for them. Despite all the uncertainty and difficulties they have faced since we made our announcement in January, they have continued to focus on serving our Chinese users and customers. We are immensely proud of them.

Google における広義の事業展開という観点から、中国における R&D と 販売チームは維持していきたいと考えています。ただし、中国本土のユーザーが Google.com.hk にアクセスする能力に応じて、その販売チームの規模は、おそらく限定的なものになるでしょう。 最後に明らかにしておきたいのは、これら全ての決定が、アメリカの経営陣により促進され運用されていることです。そのため、私たちの中国人従業員は、一切の責任を免除されます。この 1月に私たちが発表をしたときから、彼らが直面した不確実で困難な状況にもかかわらず、彼らは中国のユーザーとカスタマーへのサービスに、フォーカスし続けてきました。 そのことを、私たちは誇りに思っています。

Posted by David Drummond, SVP, Corporate Development and Chief Legal Officer

<関連>
” Google 対 中国 ” を検証する
プライバシーとは?(Google 対 China なんて問題外) by Nicholas Carr
なぜ、Google はアジアの海底ケーブルに投資する?

March 21, 2010

Hadoop による Web 広告システムの構築と運用 :ヨーロッパでの事例_2

Filed under: Cloudera,Hadoop,MapReduce — Agile Cat @ 11:23 am
Tags: , , , , ,

Why Europe’s Largest Ad Targeting Platform Uses Hadoop_2
by Ed Albanese March 10, 2010
http://www.cloudera.com/blog/2010/03/why-europes-largest-ad-targeting-platform-uses-hadoop/

Cloudera

Headache Turning Into a Migraine

One year later our situation had changed considerably. The graph below shows the amount of data we were logging from January 2009 until December 2009.

私たちの状況は、その1年後には大きく変化していました。 以下のグラフは、2009年 1月から 12月までに、収集していたログ・データ量を示します。

Hadoop AD

In March 2009 compared to the previous year we were logging more than double the amount of data per day as the online platform went from receiving 3200 to over 8500 requests per second. The good news was our business was growing nicely. Our online platform was straight-forward to scale in tandem, we just added more machines. The bad news was our data processing platform was not as simple to scale. In March 2009 the processing times for the same events mentioned early were:

2009年3月期の前年との比較では、オンライン・プラットフォームへのリクエストが毎秒 3200 から 8500 強へと増大したように、1日あたりのログ・データ量は2倍以上になりました。 ビジネスが上手く展開していることは、とても良いことでした。 それに応じてオンライン・プラットフォームも直線的にスケールを拡大し、さらに多くのマシンを加えるだけで済みました。 ただ、良くないことも起こってきました。データ処理プラットフォームのスケールが、簡単には拡大していかなかったのです。2009年 3月には、前述のイベント処理の時間が、以下のように増大してしまいました:

• 23 hours to summarize all daily log files for all events (almost a day to process a day)
• 18 hours to create training data samples (inhibiting our ability to refresh data mining models regularly)
• 5 days to create weekly reports (our weekly reports were almost one week behind)
• 4 days to summarize data accessed via a customer web based interface (prone to crash)

• 23 時間:ログ・イベントに関する日々のデータをサマライズ(ほぼ 1日を費やすようになった)
• 18 時間:学習データのサンプルを生成(データ・マイニング・モデルの通常運用が厳しくなった)
• 5日:週レポートの生成(週レポートの提供が、約 1週間遅れとなった)
• 4日:Web ベースのインターフェイスを介して顧客がアクセスしたデータのサマライズ(クラッシュに近い)

We could no longer process our data in the time scales needed for our business. The root cause of our problem was clear. A significant increase in data volume resulted in a significant increase in processing times. Initially we thought maybe we could just improve our classical data warehouse. After analyzing our current solution and problem it was pretty clear that we could not avoid hitting scaling and performance problems.

もはや、ビジネスが要求するタイムスケール内で、データを処理できなくなっていました。 その、根本的な問題は明確です。 つまり、データ量の大幅な増加が、処理時間の大幅な増大をもたらしていたのです。 そして当初は、従来からのデータウエア・ハウスを改善できると思っていました。その時点で用いていたソリューションと問題を解析した後に、スケールの壁とパフォーマンスの問題が避けられないことが明確になりました。

Searching for Relief, We Found Hadoop

In March 2009 we started our investigation of possible technologies. As part of it we setup a Hadoop test cluster with three machines. A selection of log files was copied into the HDFS. We started writing simple Pig scripts and later MapReduce jobs using the standard Hadoop API. It took some practice to go beyond the classical word count example to writing solutions for our problems using MapReduce.

2009年 3月に、私たちは利用可能なテクノロジーについて調査を始めました。 その一環として、Hadoop のテスト・クラスタを 3台のマシンに設定しました。一連のログ・ファイルは HDFS にコピーされます。 標準的な Hadoop API を使うために、最初はシンプルな Pig スクリプトを書き始め、その後には MapReduce ジョブにも取り組みました。 私たちの 問題のためのソリューションを MapReduce を用いて記述することは、これまでのワード数カウントの例を超える、いくつかのプラクティスとなりました。

Since our initial tests looked promising, we decided to try and build our solution on Hadoop. Besides scaling there were several additional reasons:

最初のテスト結果が好ましかったので、Hadoop への取り組みと、そこでのソリューション構築を決定しました。スケールの他にも、いくつかの理由がありました:

• Relatively easy to administrate and monitor
• Easy to use (when you are a small team everyone needs to be able to change anything at anytime)
• No software licensing costs
• Only expansion cost is hardware

• 相対的に見て、運用と監視が容易
• 利用が簡単 (小規模な開発チームにおいては、いつでも全員が、システムを変更できる状況が必要)
• ソフトウェア・ライセンスにコストがかからない
• 唯一の費用はハードウェアとなる

<続く>

ーーーーー

だんだん、面白くなってきましたねぇ ーーー A.C.

<関連>

Hadoop による Web 広告システムの構築と運用 :ヨーロッパでの事例_1
Hadoop による Web 広告システムの構築と運用 :ヨーロッパでの事例_2
Hadoop による Web 広告システムの構築と運用 :ヨーロッパでの事例_3
Hadoop による Web 広告システムの構築と運用 :ヨーロッパでの事例_4

« Previous PageNext Page »

Theme: Rubric. Blog at WordPress.com.

Follow

Get every new post delivered to your Inbox.

Join 3,239 other followers