一、HAWQ基本安裝自帶gpfdist協議
gpfdist是HAWQ支持的外部表訪問協議之一,這是hawq自帶的一個簡單的集成http服務命令。
在我的前述安裝hawq之後,gpfdist命令位於hawq的bin目錄之中。/opt/gpadmin/apache-hawq/bin/gpfdist
gpfdist使用說明很簡單,且看:
[root@ep-bd01 ~]# /opt/gpadmin/apache-hawq/bin/gpfdist --help gpfdist -- file distribution web server usage: gpfdist [--ssl <certificates_directory>] [-d <directory>] [-p <http(s)_port>] [-l <log_file>] [-t <timeout>] [-v | -V] [-m <maxlen>][-c file] gpfdist [-? | --help] | --version -?, --help : print this screen -v : verbose mode -V : more verbose -p port : port to serve HTTP(S), default is 8080 -d dir : serve files under the specified directory, default is '.' -l logfn : log filename -t tm : timeout in seconds -m maxlen : max data row length expected, in bytes. default is 32768 --ssl dir : start HTTPS server. Use the certificates from the specified directory -c file : configuration file for transformations --version : print version information
這裏我只關心-d和-p兩個命令行參數
二、啓動gpfdist服務。
gpfdist不像pxf協議那麼麻煩,由於他只是服務於本機目錄,所以只要在數據目錄所在的主機上啓動gpfdist,hawq即可訪問了。