pivotal gpdb-external table gphdfs protocol命令以错误结束sh:java:未找到命令

qxsslcnc  于 2021-06-02  发布在  Hadoop
关注(0)|答案(1)|浏览(377)

我们有一个小的greenplum数据库数组。
当试图读取其中的外部表时。获取错误

proddb=# select count(*) from ext_table;
ERROR:  external table gphdfs protocol command ended with error. sh: java: command not found  (seg0 slice1 sdw:
40000 pid=8675)
DETAIL:  
Command: 'gphdfs://path/to/hdfs External table revenuereport_stg0, file gphdfs://Path/to/hdfs

我们试过:
已检查greenplum主主机上的java环境。
还检查了,设置gpdb的参数
[gpadmin@admin ~]$gpconfig-c gp\u hadoop\u home-v“'/usr/lib/gphd'”[gpadmin@admin ~]$gpconfig-c gp\u hadoop\u target\u版本-v“'gphd-2.0”
但由于这个错误,它失败了

[gpadmin@mdw ~]$ gpconfig -c gp_hadoop_home -v "'/usr/lib/gphd'"
20170123:02:02:04:017762 gpconfig:mdw:gpadmin-[ERROR]:-failed updating the postgresql.conf files on host: sdw
20170123:02:02:04:017762 gpconfig:mdw:gpadmin-[ERROR]:-failed updating the postgresql.conf files on host: mdw
20170123:02:02:09:017762 gpconfig:mdw:gpadmin-[ERROR]:-finished with errors

因此,从greenplum主机访问hdfs的测试不起作用。

Checked if  HDFS is accessible from any of the segment servers

[gpadmin@sdw1 ~]$hdfs dfs -ls hdfs://hdm2:8020/

任何帮助都将不胜感激!

wkftcu5l

wkftcu5l1#

在我看来这是一个路径问题。请在hadoop-env.sh文件中设置正确的java\u home
另外,为了更好地理解如何使用gpdb配置gphdfs,请阅读以下文章。
https://discuss.pivotal.io/hc/en-us/articles/202635496-how-to-access-hdfs-data-via-gpdb-external-table-with-gphdfs-protocol
https://discuss.pivotal.io/hc/en-us/articles/203083906-understanding-gphdfs-configurations
https://discuss.pivotal.io/hc/en-us/articles/221492507-one-time-hdfs-protocol-installation-for-gphdfs-access-to-hdp-2-x-cluster
谢谢普拉西什·奈尔

相关问题