It is a library for accessing hdfs from php. You can install using Composer. We use webhdfs as communication protocol.
None
<?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');
}
None.
$ composer require "genzouw/php-hdfs-client:dev-master"
date | version | note |
---|---|---|
2018-09-07 | 0.1 | first release. |
This software is released under the MIT License, see LICENSE.
- Twitter : @genzouw ( https://twitter.com/genzouw )
- Facebook : genzouw ( https://www.facebook.com/genzouw )
- LinkedIn : genzouw ( https://www.linkedin.com/in/genzouw/ )
- Gmail : [email protected]