Browse files

update documents

  • Loading branch information...
1 parent ee686ec commit d9cfebe77b2786ea91605aebcff932228f3963bb @xianglei committed Aug 6, 2012
Showing with 28 additions and 24 deletions.
  1. +3 −3 INSTALL
  2. +8 −2 README
  3. +4 −19 download.php
  4. +13 −0 libs/classes/class.etl.php
View
6 INSTALL
@@ -106,9 +106,9 @@ $env['output_path'] = '/data2/tmp/phpHiveAdmin';
验证部分accesslist.ini设置.
[0]
;userset order above
-username=yourname
-password=yourpass
-privdb=the database that this user can see
+username=用户名
+password=密码
+privdb=该用户可见的数据库
mrslots=map slots,reduce slots(最近版本不会使用,但是未来会开放)
onlydb写all为全部访问,写数据库名则访问单独的数据库,库名可写多个,以英文逗号分隔。
role=superadmin( dbadmin, user ) #superadmin 可读取全部数据库并管理, dbadmin 可读取privdb设置的dbs并管理, user 仅可读取privdb设置的数据库,不能管理
View
10 README
@@ -7,11 +7,17 @@ Program development environment:
CentOS 5.4
Hadoop-0.20.203.0
Hive 0.7.1
-Fusefs 2.7.4
-Fuse-dfs
php 5.3.8
nginx 1.0.10
+Test passed with environment below:
+centos 5.x - 6.x
+ubuntu 11.x - 12.x
+Hadoop 0.20.x - 1.0.x
+Hive 0.6.x - 0.9.x
+php 5.3.x - 5.4.x
+nginx 1.0.x - 1.2.x
+
Can be support with:
Linux,FreeBSD with php 5.3+ and nginx 1.0+, doesn't support with windows.
But you must hive a hive-cli on the machine which put phpHiveAdmin on it.
View
23 download.php
@@ -6,40 +6,25 @@
else
{
include_once "config.inc.php";
- //$env['output_path'] = '/tmp/phpHiveAdmin';
+
$filename = $env['output_path']."/hive_res.".$_GET['str'].".csv";
$fname = "hive_res.".$_GET['str'].".csv";
if(file_exists($filename))
- {
- /*
- $fp = fopen($filename,"r");
- $fd = fopen($env['download_path']."/hive_res.".$_GET['str'].".out","w");
- while(!feof($fp))
- {
- $str = fgets($fp,1024);
- $str = str_replace(" ","\t",$str);
- fputs($fd,$str);
- }
- fclose($fp);
- fclose($fd);
- */
-
- //unlink($filename);
-
+ {
header("Pragma: public");
header("Expires: 0");
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
header("Content-Type: application/force-download");
header('Content-Length: ' . filesize($filename));
header("Content-Disposition: attachment; filename=".$fname);
- //readfile($filename);
+
$fp = fopen ($filename,"r");
while (!feof($fp))
{
echo $str = fgets($fp,4096);
}
fclose($fp);
- //unlink($filename);
+
}
else
{
View
13 libs/classes/class.etl.php
@@ -62,5 +62,18 @@ public function ParseEtl($pFilename)
return FALSE;
}
}
+
+ public function EtlHelp()
+ {
+ echo "Syntax: ".$_SERVER['argv'][0]. " -option value\n";
+ echo "Options description:\n";
+ echo " -r etl settings ini file\n";
+ echo " -s Time range start flag\n";
+ echo " -t Time range end flag\n";
+ echo " -h This Help\n";
+ echo "Example: \n";
+ echo " /path/to/phpHiveAdmin/".$_SERVER['argv'][0]." -r example.ini -s 2012-07-06 -e 2012-08-06\n";
+ echo " /path/to/phpHiveAdmin/".$_SERVER['argv'][0]." -r example.ini\n\n";
+ }
}
?>

0 comments on commit d9cfebe

Please sign in to comment.