Skip to content

It is a library for accessing hdfs from php. You can install using Composer. We use webhdfs as communication protocol.

License

Notifications You must be signed in to change notification settings

genzouw/php-hdfs-client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

php-hdfs-client

It is a library for accessing hdfs from php. You can install using Composer. We use webhdfs as communication protocol.

Description

None

Demo

<?php
// ...

$hdfsClient = new HdfsClient('your_hdfs_namenode');

$hdfsFilePath = '/user/hive/warehouse/test.db/foo_table';

$hdfsFileContents = """\
1,2,3
4,5,6""";

$status = $hdfsClient->putFileToRemote($hdfsFilePath, $hdfsFileContents);

// Error Case!
if ($status === false || !empty(json_decode($status, true)['RemoteException']['exception'])) {
    throw new Exception('Hdfs fileput error');
}

Requirements

Dependencies

None.

Installation

$ composer require "genzouw/php-hdfs-client:dev-master"

Relase Note

date version note
2018-09-07 0.1 first release.

This software is released under the MIT License, see LICENSE.

Author Information

genzouw

About

It is a library for accessing hdfs from php. You can install using Composer. We use webhdfs as communication protocol.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages