PHPackages                             simpleenergy/php-webhdfs - 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. [HTTP &amp; Networking](/categories/http)
4. /
5. simpleenergy/php-webhdfs

ActiveLibrary[HTTP &amp; Networking](/categories/http)

simpleenergy/php-webhdfs
========================

PHP WebHDFS, forked from https://github.com/simpleenergy/php-WebHDFS

1.0.8(2y ago)60107.3k↓23.1%41[3 PRs](https://github.com/xaviered/php-WebHDFS/pulls)MITPHPPHP &gt;=5.4.0

Since Oct 15Pushed 1y ago21 watchersCompare

[ Source](https://github.com/xaviered/php-WebHDFS)[ Packagist](https://packagist.org/packages/simpleenergy/php-webhdfs)[ RSS](/packages/simpleenergy-php-webhdfs/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (5)DependenciesVersions (10)Used By (0)

php-WebHDFS
===========

[](#php-webhdfs)

Description
-----------

[](#description)

php-WebHDFS is a PHP client for [WebHDFS](http://hadoop.apache.org/docs/r2.0.3-alpha/hadoop-project-dist/hadoop-hdfs/WebHDFS.html).

Dependencies
------------

[](#dependencies)

- [PHP](http://php.net/)
- [cURL](http://curl.haxx.se/)

Install via composer
--------------------

[](#install-via-composer)

```
composer require simpleenergy/php-webhdfs
```

Usage
-----

[](#usage)

- [File and Directory Operations](#file-and-directory-operations)
    - [Create and Write to a File](#create-and-write-to-a-file)
    - [Create and write content directly to a file](#create-and-write-content-directly-to-a-file)
    - [Append to a File](#append-to-a-file)
    - [Concat File(s)](#concat-files)
    - [Open and Read a File](#open-and-read-a-file)
    - [Make a Directory](#make-a-directory)
    - [Create a Symbolic Link](#create-a-symbolic-link)
    - [Rename a File/Directory](#rename-a-filedirectory)
    - [Delete a File/Directory](#delete-a-filedirectory)
    - [Status of a File/Directory](#status-of-a-filedirectory)
    - [List a Directory](#list-a-directory)
- [Other File System Operations](#other-file-system-operations)
    - [Get Content Summary of a Directory](#get-content-summary-of-a-directory)
    - [Get File Checksum](#get-file-checksum)
    - [Get Home Directory](#get-home-directory)
    - [Set Permission](#set-permission)
    - [Set Owner](#set-owner)
    - [Set Replication Factor](#set-replication-factor)
    - [Set Access or Modification Time](#set-access-or-modification-time)

### File and Directory Operations

[](#file-and-directory-operations)

#### Create and Write to a File

[](#create-and-write-to-a-file)

```
hdfs = new WebHDFS('mynamenode.hadoop.com', '50070', 'hadoop-username');
$hdfs->create('user/hadoop-username/new-file.txt', 'local-file.txt');
```

#### Create and write content directly to a file

[](#create-and-write-content-directly-to-a-file)

```
hdfs = new WebHDFS('mynamenode.hadoop.com', '50070', 'hadoop-username');
$hdfs->createWithData('user/hadoop-username/new-file.txt', 'content');
```

#### Append to a File

[](#append-to-a-file)

```
$hdfs = new WebHDFS('mynamenode.hadoop.com', '50070', 'hadoop-username');
$hdfs->append('user/hadoop-username/file-to-append-to.txt', 'local-file.txt');
```

#### Concat File(s)

[](#concat-files)

```
$hdfs = new WebHDFS('mynamenode.hadoop.com', '50070', 'hadoop-username');
$hdfs->concat('user/hadoop-username/concatenated-file.txt', '/test/file1,/test/file2,/test/file3');
```

#### Open and Read a File

[](#open-and-read-a-file)

```
$hdfs = new WebHDFS('mynamenode.hadoop.com', '50070', 'hadoop-username');
$response = $hdfs->open('user/hadoop-username/file.txt');
```

#### Make a Directory

[](#make-a-directory)

```
$hdfs = new WebHDFS('mynamenode.hadoop.com', '50070', 'hadoop-username');
$hdfs->mkdirs('user/hadoop-username/new/directory/structure');
```

#### Create a Symbolic Link

[](#create-a-symbolic-link)

```
$hdfs = new WebHDFS('mynamenode.hadoop.com', '50070', 'hadoop-username');
$hdfs->createSymLink('user/hadoop-username/file.txt', '/user/hadoop-username/symlink-to-file.txt');
```

#### Rename a File/Directory

[](#rename-a-filedirectory)

```
$hdfs = new WebHDFS('mynamenode.hadoop.com', '50070', 'hadoop-username');
$hdfs->rename('user/hadoop-username/file.txt', '/user/hadoop-username/renamed-file.txt');
```

#### Delete a File/Directory

[](#delete-a-filedirectory)

```
hdfs = new WebHDFS('mynamenode.hadoop.com', '50070', 'hadoop-username');
$hdfs->delete('user/hadoop-username/file.txt');
```

#### Status of a File/Directory

[](#status-of-a-filedirectory)

```
$hdfs = new WebHDFS('mynamenode.hadoop.com', '50070', 'hadoop-username');
$response = $hdfs->getFileStatus('user/hadoop-username/file.txt');
```

#### List a Directory

[](#list-a-directory)

```
$hdfs = new WebHDFS('mynamenode.hadoop.com', '50070', 'hadoop-username');
$response = $hdfs->listStatus('user/hadoop-username/');
```

### Other File System Operations

[](#other-file-system-operations)

#### Get Content Summary of a Directory

[](#get-content-summary-of-a-directory)

```
$hdfs = new WebHDFS('mynamenode.hadoop.com', '50070', 'hadoop-username');
$response = $hdfs->getContentSummary('user/hadoop-username/');
```

#### Get File Checksum

[](#get-file-checksum)

```
$hdfs = new WebHDFS('mynamenode.hadoop.com', '50070', 'hadoop-username');
$response = $hdfs->getFileChecksum('user/hadoop-username/file.txt');
```

#### Get Home Directory

[](#get-home-directory)

```
$hdfs = new WebHDFS('mynamenode.hadoop.com', '50070', 'hadoop-username');
$response = $hdfs->getHomeDirectory();
```

#### Set Permission

[](#set-permission)

```
$hdfs = new WebHDFS('mynamenode.hadoop.com', '50070', 'hadoop-username');
$hdfs->setPermission('user/hadoop-username/file.txt', '777');
```

#### Set Owner

[](#set-owner)

```
$hdfs = new WebHDFS('mynamenode.hadoop.com', '50070', 'hadoop-username');
$hdfs->setOwner('user/hadoop-username/file.txt', 'other-user');
```

#### Set Replication Factor

[](#set-replication-factor)

```
$hdfs = new WebHDFS('mynamenode.hadoop.com', '50070', 'hadoop-username');
$hdfs->setReplication('user/hadoop-username/file.txt', '2');
```

#### Set Access or Modification Time

[](#set-access-or-modification-time)

```
$hdfs = new WebHDFS('mynamenode.hadoop.com', '50070', 'hadoop-username');
$response = $hdfs->setTimes('user/hadoop-username/file.txt');
```

###  Health Score

43

—

FairBetter than 91% of packages

Maintenance27

Infrequent updates — may be unmaintained

Popularity45

Moderate usage in the ecosystem

Community25

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 55.2% 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.

###  Release Activity

Cadence

Every ~504 days

Total

5

Last Release

756d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/8f28d50bac8b5187a02f095710a68f631a377626bb404b6f52270186c21480cd?d=identicon)[michaelbutler](/maintainers/michaelbutler)

![](https://www.gravatar.com/avatar/54b7f7b642d84782c008e069bad24cd6e04c6b3dc75758e094cde2e3a08a3e33?d=identicon)[xaviered](/maintainers/xaviered)

---

Top Contributors

[![xaviered](https://avatars.githubusercontent.com/u/1844174?v=4)](https://github.com/xaviered "xaviered (16 commits)")[![jacobko](https://avatars.githubusercontent.com/u/1041097?v=4)](https://github.com/jacobko "jacobko (6 commits)")[![Thanavath](https://avatars.githubusercontent.com/u/765961?v=4)](https://github.com/Thanavath "Thanavath (3 commits)")[![dshap](https://avatars.githubusercontent.com/u/283225?v=4)](https://github.com/dshap "dshap (1 commits)")[![tranch](https://avatars.githubusercontent.com/u/5999732?v=4)](https://github.com/tranch "tranch (1 commits)")[![rtio](https://avatars.githubusercontent.com/u/5431713?v=4)](https://github.com/rtio "rtio (1 commits)")[![yosshi](https://avatars.githubusercontent.com/u/41183?v=4)](https://github.com/yosshi "yosshi (1 commits)")

### Embed Badge

![Health badge](/badges/simpleenergy-php-webhdfs/health.svg)

```
[![Health](https://phpackages.com/badges/simpleenergy-php-webhdfs/health.svg)](https://phpackages.com/packages/simpleenergy-php-webhdfs)
```

###  Alternatives

[friendsofsymfony/rest-bundle

This Bundle provides various tools to rapidly develop RESTful API's with Symfony

2.8k73.3M319](/packages/friendsofsymfony-rest-bundle)[php-http/discovery

Finds and installs PSR-7, PSR-17, PSR-18 and HTTPlug implementations

1.3k309.5M1.2k](/packages/php-http-discovery)[pusher/pusher-php-server

Library for interacting with the Pusher REST API

1.5k94.8M293](/packages/pusher-pusher-php-server)[react/http

Event-driven, streaming HTTP client and server implementation for ReactPHP

78026.4M414](/packages/react-http)[php-http/curl-client

PSR-18 and HTTPlug Async client with cURL

48347.0M384](/packages/php-http-curl-client)[smi2/phpclickhouse

PHP ClickHouse Client

84310.1M71](/packages/smi2-phpclickhouse)

PHPackages © 2026

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