0

我们有小型 gpdb 集群。当我尝试使用'gphdfs'来自 gpdb master 的协议读取外部表时。环境

产品版本 Pivotal Greenplum (GPDB) 4.3.8.2 操作系统 Centos 6.5

得到错误:

prod=# select * from ext_table;                                                                                      ERROR:  external table gphdfs protocol command ended with error. 16/10/05 14:42:51 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable  (seg0 slice1 host.domain.com:40000 pid=25491)
DETAIL:

Exception in thread "main" org.apache.hadoop.mapreduce.lib.input.InvalidInputException: Input path does not exist: hdfs://path/to/hdfs
        at org.apache.hadoop.mapreduce.lib.input.FileInputFormat.listStatus(FileInputFormat.java:285)
        at org.apache.hadoop.mapreduce.lib.input.FileInputFormat.getSplits(FileInputFormat.java:340)
        at com.
Command: 'gphdfs://path/to/hdfs'
External table tableame, file gphdfs://path/to/hdfs

我们尝试了:Greenplum 主机上的以下链接 https://discuss.pivotal.io/hc/en-us/articles/219403388-How-to-eliminate-error-message-WARN-util-NativeCodeLoader-Unable-to-load -native-hadoop-library-for-your-platform-with-gphdfs

命令结果

按照链接中的建议更改“Hadoop-env.sh”中的内容后它不起作用。仍然抛出相同的错误。我是否需要重新启动 gpdb 以影响更改“Hadoop-env.sh”。

或者

是否有替代方法来处理 gphdfs 协议错误?

任何帮助将不胜感激?

附件是失败的外部表的 DDL

create external table schemaname.exttablename(
"ID" INTEGER,
time timestamp without time zone,
"SalesOrder" char(6),
"NextDetailLine" decimal(6),
"OrderStatus" char(1),

)
location('gphdfs://hadoopmster.com:8020/devgpdb/filename.txt') FORMAT 'text'
4

2 回答 2

2

您能否提供失败的外部表 DDL。另外请确保 gpadmin 用户有权读取和写入数据的 hdfs 路径。谢谢 Pratheesh Nair

于 2016-10-05T17:09:52.197 回答
0

刚在客户现场遇到这个。这篇 Pivotal 支持文章提供了答案: https ://discuss.pivotal.io/hc/en-us/articles/219403388-How-to-eliminate-error-message-WARN-util-NativeCodeLoader-Unable-to-load-本机-hadoop-library-for-your-platform-with-gphdfs

于 2016-10-05T19:08:15.250 回答