読者です 読者をやめる 読者になる 読者になる

inohilog

/var/log/inohiro

Hadoop 導入

Pi を計算するサンプルを実行してみた

  • CPU 2コアなので2プロセスが速そうだなと思ったので
    • 思ったよりも結果に揺れがあるので10回ずつ測って平均とかのほうがいいかも
1プロセス
$ ./hadoop jar ../hadoop-examples-0.20.203.0.jar pi 1 10000
Number of Maps  = 1
Samples per Map = 10000
Wrote input for Map #0
Starting Job
< 省略 >
Job Finished in 39.313 seconds
Estimated value of Pi is 3.14080000000000000000
2プロセス
$ ./hadoop jar ../hadoop-examples-0.20.203.0.jar pi 2 10000
Number of Maps  = 2
Samples per Map = 10000
Wrote input for Map #0
Wrote input for Map #1
Starting Job
< 省略 >
Job Finished in 38.043 seconds
Estimated value of Pi is 3.14280000000000000000
4プロセス
$ ./hadoop jar ../hadoop-examples-0.20.203.0.jar pi 4 10000
Number of Maps  = 4
Samples per Map = 10000
Wrote input for Map #0
Wrote input for Map #1
Wrote input for Map #2
Wrote input for Map #3
Starting Job
< 省略 >
Job Finished in 42.332 seconds
Estimated value of Pi is 3.14140000000000000000