makotokw / hadoopstreaming
Map/Reduce classes for Hadoop Streaming
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: 2025-01-14 05:48:19 UTC
README
Install
Add to composer.json
{
"require": {
"makotokw/hadoopstreaming": "dev-master"
}
}
Usage
simple test without hadoop
cd examples/wordcount
php mapper.php < word.txt | sort | php reducer.php
with 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'
LICENSE
The MIT License (MIT)