开发者社区> 问答> 正文

kettle 无法调用gpload

在gpload安装的机器,命令行执行gpload命令
[root@kettle bin]# gpload -f my_load.yml
2016-12-15 19:35:41|INFO|gpload session started 2016-12-15 19:35:41
2016-12-15 19:35:41|INFO|started gpfdist -p 8899 -P 8900 -f "/home/admin/gpe
xtdata/c.txt" -t 302016-12-15 19:35:42|INFO|running time: 0.67 seconds
2016-12-15 19:35:42|INFO|rows Inserted = 7
2016-12-15 19:35:42|INFO|rows Updated = 0
2016-12-15 19:35:42|INFO|data formatting errors = 0
2016-12-15 19:35:42|INFO|gpload succeeded
[root@kettle bin]#

在master主机中查看数据
tutorial=> select * from public.test001;

id name
1 2
3 3
1 2
1 3
1 22
1 222
1 22222

(7 rows)

现在是kettle调用gpload时报错信息如下

2016/12/15 05:00:25 - Greenplum Load.0 - Executing: /usr/local/greenplum-loaders-4.3.8.1-build-1/bin/gpload -f /home/admin/gpextdata/my_flag.yml
2016/12/15 05:00:25 - Greenplum Load.0 - Exit Value of psql: 127
2016/12/15 05:00:25 - Greenplum Load.0 - ERROR (version 5.4.0.1-130, build 1 from 2015-06-14_12-34-55 by buildguy) : Error in step, asking everyone to stop because of:
2016/12/15 05:00:25 - Greenplum Load.0 - Exit Value of psql: 127
2016/12/15 05:00:25 - Greenplum Load.0 - Finished processing (I=0, O=7, R=7, W=7, U=0, E=1)
2016/12/15 05:00:25 - Greenplum Load.0 - ERROR>/usr/local/greenplum-loaders-4.3.8.1-build-1/bin/gpload: line 14: exec: gpload.py: not found

可是这个命令直接在命令行可以执行

[root@kettle bin]# /usr/local/greenplum-loaders-4.3.8.1-build-1/bin/gpload
-f /home/admin/gpextdata/my_flag.yml2016-12-15 19:41:58|INFO|gpload session started 2016-12-15 19:41:58
2016-12-15 19:41:58|INFO|started gpfdist -p 8899 -P 8900 -f "/home/admin/gpe
xtdata/c.txt" -t 302016-12-15 19:41:58|INFO|running time: 0.15 seconds
2016-12-15 19:41:58|INFO|rows Inserted = 7
2016-12-15 19:41:58|INFO|rows Updated = 0
2016-12-15 19:41:58|INFO|data formatting errors = 0
2016-12-15 19:41:58|INFO|gpload succeeded
[root@kettle bin]#

环境变量:
[root@kettle bin]# cat ~/.bash_profile

.bash_profile

Get the aliases and functions

if [ -f ~/.bashrc ]; then

. ~/.bashrc

fi

User specific environment and startup programs

PATH=$PATH:$HOME/bin
source /usr/local/greenplum-loaders-4.3.8.1-build-1/greenplum_loaders_path.s
hexport PATH
export PGDATABASE=tutorial
export PGHOST=master
export PGPORT=5432
export PGUSER=gpadmin
export PGPASSWORD=gpadmin

export PYTHONPATH=/usr/local/lib
[root@kettle bin]#

[root@kettle greenplum-loaders-4.3.8.1-build-1]# cat greenplum_loaders_path.
sh if [ uname -s = "HP-UX" ]; then

set +o nounset

fi

GPHOME_LOADERS=/usr/local/greenplum-loaders-4.3.8.1-build-1
PATH=${GPHOME_LOADERS}/bin:${GPHOME_LOADERS}/ext/python/bin:${PATH}
PYTHONPATH=${GPHOME_LOADERS}/bin/ext:${PYTHONPATH}

export GPHOME_LOADERS
export PATH
export PYTHONPATH

Mac OSX uses a different library path variable

if [ xDarwin = xuname -s ]; then
DYLD_LIBRARY_PATH=${GPHOME_LOADERS}/lib:${GPHOME_LOADERS}/ext/python/lib:$
{DYLD_LIBRARY_PATH} export DYLD_LIBRARY_PATH
else
LD_LIBRARY_PATH=${GPHOME_LOADERS}/lib:${GPHOME_LOADERS}/ext/python/lib:${L
D_LIBRARY_PATH} export LD_LIBRARY_PATH
fi

AIX uses yet another library path variable

Also, Python on AIX requires special copies of some libraries. Hence, lib

/pware.if [ xAIX = xuname -s ]; then
LIBPATH=${GPHOME_LOADERS}/lib/pware:${GPHOME_LOADERS}/lib:${GPHOME_LOADERS
}/ext/python/lib:/usr/lib/threads:${LIBPATH} export LIBPATH
GP_LIBPATH_FOR_PYTHON=${GPHOME_LOADERS}/lib/pware
export GP_LIBPATH_FOR_PYTHON
fi

if [ "$1" != "-q" ]; then
type python >/dev/null 2>&1
if [ $? -ne 0 ]; then

echo "Warning: Python not found.  Python-2.5.1 or better is required to 

run gpload." fi
fi
[root@kettle greenplum-loaders-4.3.8.1-build-1]#

现在应该是环境变量,但是不知道该如何解决

展开
收起
gh_95533 2016-12-16 09:40:01 8745 0
0 条回答
写回答
取消 提交回答
问答分类:
问答地址:
问答排行榜
最热
最新

相关电子书

更多
《Apache Flink-重新定义计算》PDF下载 立即下载
HBase实践之MOB使用指南(未翻译) 立即下载
MaxCompute Logview参数详解和问题排查(废弃) 立即下载

相关实验场景

更多