在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
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
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
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
/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]#
现在应该是环境变量,但是不知道该如何解决
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。