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

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

dingfudata/php-webhdfs
======================

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

00PHP

Since Oct 14Pushed 9y agoCompare

[ Source](https://github.com/dingfudata/php-WebHDFS)[ Packagist](https://packagist.org/packages/dingfudata/php-webhdfs)[ RSS](/packages/dingfudata-php-webhdfs/feed)WikiDiscussions master Synced 2mo 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/)

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

19

—

LowBetter than 10% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity0

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 66.7% 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/1fe3a6e13155c0361220157b073f2ba68ab5a5d28b3d8d69f6913b619fccda3d?d=identicon)[xfight](/maintainers/xfight)

---

Top Contributors

[![jacobko](https://avatars.githubusercontent.com/u/1041097?v=4)](https://github.com/jacobko "jacobko (6 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)")[![yosshi](https://avatars.githubusercontent.com/u/41183?v=4)](https://github.com/yosshi "yosshi (1 commits)")

### Embed Badge

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

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