PHPackages                             mrferos/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. mrferos/webhdfs

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

mrferos/webhdfs
===============

WebHDFS implementation in PHP

0124PHP

Since Oct 30Pushed 11y ago1 watchersCompare

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

READMEChangelogDependenciesVersions (1)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/)

Todo
----

[](#todo)

- Write unit tests
- Consider swapping out the original Curl class for Guzzle

Usage
-----

[](#usage)

- [File and Directory Operations](#file-and-directory-operations)
    - [Create and Write to a File](#create-and-write-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\WebHDFS('mynamenode.hadoop.com', '50070', 'hadoop-username');
$hdfs->create('user/hadoop-username/new-file.txt', 'local-file.txt');
```

#### Append to a File

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

```
$hdfs = new WebHDFS\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\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\WebHDFS('mynamenode.hadoop.com', '50070', 'hadoop-username');
$response = $hdfs->open('user/hadoop-username/file.txt');
```

#### Make a Directory

[](#make-a-directory)

```
$hdfs = new WebHDFS\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\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\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\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\WebHDFS('mynamenode.hadoop.com', '50070', 'hadoop-username');
$response = $hdfs->getFileStatus('user/hadoop-username/file.txt');
```

#### List a Directory

[](#list-a-directory)

```
$hdfs = new WebHDFS\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\WebHDFS('mynamenode.hadoop.com', '50070', 'hadoop-username');
$response = $hdfs->getContentSummary('user/hadoop-username/');
```

#### Get File Checksum

[](#get-file-checksum)

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

#### Get Home Directory

[](#get-home-directory)

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

#### Set Permission

[](#set-permission)

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

#### Set Owner

[](#set-owner)

```
$hdfs = new WebHDFS\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\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\WebHDFS('mynamenode.hadoop.com', '50070', 'hadoop-username');
$response = $hdfs->setTimes('user/hadoop-username/file.txt');
```

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 75% 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/7af41bdd34c88e63ccca096fa4f461a24650f13161920be9a28de13068fbe0a1?d=identicon)[mrferos](/maintainers/mrferos)

---

Top Contributors

[![mrferos](https://avatars.githubusercontent.com/u/69551?v=4)](https://github.com/mrferos "mrferos (3 commits)")[![jacobko](https://avatars.githubusercontent.com/u/1041097?v=4)](https://github.com/jacobko "jacobko (1 commits)")

### Embed Badge

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

```
[![Health](https://phpackages.com/badges/mrferos-webhdfs/health.svg)](https://phpackages.com/packages/mrferos-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)[nyholm/psr7

A fast PHP7 implementation of PSR-7

1.3k235.4M2.4k](/packages/nyholm-psr7)[pusher/pusher-php-server

Library for interacting with the Pusher REST API

1.5k94.8M293](/packages/pusher-pusher-php-server)[spatie/crawler

Crawl all internal links found on a website

2.8k16.3M52](/packages/spatie-crawler)[react/http

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

78126.4M414](/packages/react-http)

PHPackages © 2026

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