Skip to content

Commit 3250dda

Browse files
author
px d
committed
Merge branch 'master' of github.com:xaviered/php-WebHDFS
# Conflicts: # src/org/apache/hadoop/WebHDFS.php # src/org/apache/hadoop/tools/Curl.php
2 parents 3a7f6b6 + 391e530 commit 3250dda

File tree

5 files changed

+659
-498
lines changed

5 files changed

+659
-498
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"description": "PHP WebHDFS, forked from https://github.com/simpleenergy/php-WebHDFS",
44
"minimum-stability": "stable",
55
"license": "MIT",
6-
"version": "1.0.4",
6+
"version": "1.0.5",
77
"authors": [
88
{
99
"name": "tranch-xiao",

examples/download.php

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
<?php
2+
/**
3+
* @author pengxiang.dai <[email protected]>
4+
*/
5+
6+
//$fp = fopen('/tmp/t.pack','a');
7+
//var_dump($fp);
8+
//$a = function () use ($fp) {
9+
// var_dump($fp);
10+
// //$fp = $this->options['local_file_handler'];
11+
// //$fp = fopen('/tmp/t.pack','a');
12+
// $length = fwrite($fp, "ddd");
13+
// //var_dump(111);exit;
14+
// return $length;
15+
//};
16+
//$a();exit;
17+
18+
19+
require_once __DIR__.'/argv-parser.php';
20+
require_once __DIR__.'/../vendor/autoload.php';
21+
22+
$arguments = getArguments();
23+
$hdfs = new \org\apache\hadoop\WebHDFS(
24+
$arguments->namenode_host,
25+
$arguments->namenode_port,
26+
$arguments->namenode_user,
27+
$arguments->namenode_rpc_host,
28+
$arguments->namenode_rpc_port,
29+
$arguments->debug === 'true'
30+
);
31+
var_dump($hdfs->open($arguments->source_path,'','','', $arguments->target_path));
32+
33+
?>

0 commit comments

Comments
 (0)