ハドゥープが意味するものは?(前編)

前編 / 中編1 / 中編2 / 後編

MapReduce is Google's secret weapon: A way of breaking complicated problems apart, and spreading them across many computers. Hadoop is an open source implementation of MapReduce that you can use on your own computers, in the same way. How does Hadoop work, and how might you best use it?

マップリデュースはグーグルの秘密兵器だ。複雑な問題をばらばらに分けて、多くのコンピュータにわたって分散させる方法だ。ハドゥープはオープンソースのインプリメンテーションであるマップリデュースで、それは自分のパソコンを使うことができるのと同じ方法なんだ。ハドゥープはどうやって動いていているだろう、そしてどうやったら上手に使ってみることができるだろう?

Especially if you were interested in the recent news involving Yahoo and Hadoop, or if you're interested in cloud computing, it's worth finding out.

特に最近のヤフーやハドゥープについての記事に興味があったとしたら、またはクラウド・コンピューティングに興味があったら、探し出す価値があるね。

Why is Google so successful? One answer is that they have a smarter search algorithm. You could also say that they have a winning advertising system, based on their search algorithm. And yet another possibility is that Google's enormous profits have enabled it to hire the best and the brightest computer scientists, who further refine the search algorithm, as well as Google's various applications and services.

グーグルがとても成功したのはなぜだろう?その一つの答えはグーグルはよりスマートな検索アルゴリズムを使っていたからだ。グーグルが検索アルゴリズムがベースになった広告システムも獲得したと言うかもしれないね。それからまだ他の可能性、グーグルは巨額な収益があって、ベスト・アンド・ブライテストなコンピュータサイエンティストを雇うことが可能で、検索アルゴリズムをいっそう洗練させていて、多様なアプリケーションやサービスも同様により優れたものにすることだってできる。

But another reason for Google's success is that they have learned how to take advantage of large clusters of computers, much better and faster than their rivals. A key component to this success is something known as MapReduce, which allows Google's engineers to define a problem in such a way that it is broken up, allocated to a large number of computers for processing, reassembled, and then used.

でも、グーグルが成功したもう一つの理由は、巨大なコンピューター群にどうやって優位に立つか知っていったからだ。ライバルよりもすっと優れていて、速かったからだ。この成功のキーコンポーネントはマップリデュースとして知られている何かで、それはグーグルのエンジニアが、分割するようなやり方で問題を明確にさせて、たくさんのコンピュータに割り当てて、情報を処理して、組み立てて、そして使うことを可能にするのだ。

MapReduce is based on "functional programming," a style common in such languages as Lisp, and available in high-level languages such as Perl, Python, and Ruby. In functional programming, data is rarely assigned to a variable. Rather, it is processed as it passes through different types of functions. The "map" part of MapReduce is a built-in function that invokes the same operation on each element of a list. So in Ruby, we can say:

マップリデュースは「関数プログラミング」に基づいている。Lispという言語に共通するスタイルを持ち、PerlPythonRubyのような高級言語が使える。関数プログラミングでは、データを変数で代入することはめったにしない。どちらかといえば、異なった関数の型を通過させるというプロセスをする。マップリデュースの「マップ」の部分では、組み込み関数で、リストに載っているそれぞれの要素と同じ操作を呼び出す。さて、Rubyでこのように書くと

[1, 2, 3].map{|i| i * 10}
The above code takes the three-element array [1,2,3], and multiplies each element by 10. The original array is not modified, but "map" returns a new array whose value is [10, 20, 30]. Of course, you can apply far more sophisticated functions to "map", ranging from image processing to text searches.

[1, 2, 3].map{|i| i * 10}
上記のコードは、[1,2,3]と3つのエレメントが並んでいて、それぞれのエレメントを10倍する。もともとの配列は変更していないが、「マップ」では[10,20,30]という値で新しい配列が返された。もちろん、もっとずっと洗練された関数で、画像処理から文章検索まで幅広く「マップ」に応用させることができる。


前編 / 中編1 / 中編2 / 後編