makotokw / hadoopstreaming
Hadoop Streaming 的 Map/Reduce 类
v1.0
2015-04-22 09:34 UTC
Requires
- php: >=5.3.0
Requires (Dev)
- phpunit/phpunit: 3.7.*
This package is not auto-updated.
Last update: 2024-09-24 04:01:32 UTC
README
安装
添加到 composer.json
{
"require": {
"makotokw/hadoopstreaming": "dev-master"
}
}
用法
无 Hadoop 的简单测试
cd examples/wordcount
php mapper.php < word.txt | sort | php reducer.php
使用 Hadoop Streaming
hadoop-standalone/bin/hadoop jar hadoop-standalone/hadoop-streaming.jar\
-input examples/wordcount/word.txt\
-output examples/wordcount/output\
-mapper 'php examples/wordcount/mapper.php'\
-reducer 'php examples/wordcount/reducer.php'
许可证
MIT 许可证 (MIT)