Skip to content

Yujiro3/WebHDFS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WebHDFS PHPクライアント

PHP client for Hadoop WebHDFS

利用方法

ホームディレクトリの取得

<?php
require_once './WebHDFS.php';

/* ホストとポートを指定する */
$hdfs = new WebHDFS('localhost', 50700);

echo $hdfs->homedir();

出力結果

/user/webuser

新規ファイルの作成

<?php
require_once './WebHDFS.php';

$hdfs = new WebHDFS();

$hdfs->put('/user/webuser/sample.txt', "sample\ntest\n");

ファイルの読み込み

<?php
require_once './WebHDFS.php';

/* ホストを指定する */
$hdfs = new WebHDFS('localhost');

echo $hdfs->cat('/user/webuser/sample.txt');

出力結果

sample
test

ライセンス

Copyright © 2013 Yujiro Takahashi
Licensed under the MIT License.
Distributed under the MIT License.

About

PHP client for Hadoop WebHDFS

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages