PHPackages                             ihor/phadoop - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. ihor/phadoop

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

ihor/phadoop
============

Simple library for writing map/reduce jobs for Hadoop in PHP

18263PHP

Since Jan 3Pushed 10y ago1 watchersCompare

[ Source](https://github.com/ihor/Phadoop)[ Packagist](https://packagist.org/packages/ihor/phadoop)[ RSS](/packages/ihor-phadoop/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependenciesVersions (1)Used By (0)

Phadoop
=======

[](#phadoop)

Phadoop allows you to write map/reduce tasks for Hadoop in PHP. I created it to give a techtalk about Hadoop in the company I worked in. It is not ready for production use yet but can help you to play with Hadoop in PHP.

Installation
------------

[](#installation)

Define the following requirement in your composer.json file:

```
"require": {
    "ihor/phadoop": "0.1.x-dev"
}

```

or simply execute the following in the command line:

```
composer require ihor/phadoop

```

Usage
-----

[](#usage)

```
class Mapper extends \Phadoop\MapReduce\Job\Worker\Mapper
{
    protected function map($key, $value)
    {
        $this->emit('wordsNumber', count(preg_split('/\s+/', trim((string) $value))));
    }

}

class Reducer extends \Phadoop\MapReduce\Job\Worker\Reducer
{
    protected function reduce($key, \Traversable $values)
    {
        $result = 0;
        foreach ($values as $value) {
            $result += (int) $value;
        }

        $this->emit($key, $result);
    }
}

$mr = new \Phadoop\MapReduce('');

$job = $mr->createJob('WordCounter', 'Temp')
    ->setMapper(new Mapper())
    ->setReducer(new Reducer())
    ->clearData()
    ->addTask('Hello World')
    ->addTask('Hello Hadoop')
    ->putResultsTo('Temp/Results.txt')
    ->run();

echo $job->getLastResults();
```

You can find more examples in the [examples](https://github.com/ihor/Phadoop/tree/master/examples) directory.

###  Health Score

23

—

LowBetter than 26% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/73abba5ca14b1bc26d004398d23618fd1c60431eb4ced639b1bc56cfb9db6391?d=identicon)[ihor](/maintainers/ihor)

---

Top Contributors

[![ihor](https://avatars.githubusercontent.com/u/490943?v=4)](https://github.com/ihor "ihor (49 commits)")

---

Tags

hadoopmap-reducephp

### Embed Badge

![Health badge](/badges/ihor-phadoop/health.svg)

```
[![Health](https://phpackages.com/badges/ihor-phadoop/health.svg)](https://phpackages.com/packages/ihor-phadoop)
```

###  Alternatives

[ymirapp/wordpress-plugin

Ymir WordPress plugin

3532.3k](/packages/ymirapp-wordpress-plugin)[emanueleminotto/faker-placehold-it-provider

placehold.it provider for Faker

1423.5k1](/packages/emanueleminotto-faker-placehold-it-provider)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
