VMware Tanzu Greenplum

 View Only

 Error querying external table on HDFS using PXF (GP 5.15)

peter meng's profile image
peter meng posted Feb 27, 2019 04:39 AM

I created an external table using below command following the example provided by document:

psql # CREATE EXTERNAL TABLE pxf_hdfs_textsimple(location text, month text, num_orders int, total_sales float8)

 LOCATION ('pxf://data/pxf_examples/pxf_hdfs_simple.txt?PROFILE=HdfsTextSimple')

 FORMAT 'TEXT' (delimiter=E',');

 

When query the table, it failed with below error:

ERROR: remote component error (500) from '127.0.0.1:5888': type Exception report  message  javax.servlet.ServletException: org.apache.hadoop.ipc.RemoteException(org.apache.hadoop.security.authorize.AuthorizationException): User: gpadmin is not allowed to impersonate gpadmin  description  The server encountered an internal error that prevented it from fulfilling this request.  exception  javax.servlet.ServletException: javax.servlet.ServletException: org.apache.hadoop.ipc.RemoteException(org.apache.hadoop.security.authorize.AuthorizationException): User: gpadmin is not allowed to impersonate gpadmin (libchurl.c:944) (seg4 slice1 10.50.1.210:6000 pid=10871) (cdbdisp.c:254)

DETAIL: External table pxf_hdfs_textsimple, file pxf://data/pxf_examples/pxf_hdfs_simple.txt?PROFILE=HdfsTextSimple

 

Is there anything I was doing wrong ? please help, thanks

peter meng's profile image
peter meng

Setup hadoop core-site.xml to allow gpadmin to access the hadoop cluster solved the issue.