Page 1 of 1

HDFS execute permission

Posted: Tue Aug 20, 2013 9:33 am
by jean-baptiste.favre
Hello,
I have installed Hdfs conenctor into Vertica to be able to create external tables or load data from Hadoop into Vertica.
For that, I used following statements:

Code: Select all

-- Installation script: defined the shared library and the appropriate entry points

select version();

\set libfile '\'/opt/vertica/packages/hdfs_connectors/lib/libvertica_hdfs_conn.so\'';

CREATE LIBRARY HdfsSource as :libfile;
CREATE SOURCE Hdfs as language 'C++' name 'HdfsFactory' library HdfsSource;
Everything works fine for user dbadmin.

Now I need to grant exec rights to normal users.
Hdfs source is visible when listing procedures with

Code: Select all

\df
                                                                         List of functions
                     procedure_name                      | procedure_return_type  |                            procedure_argument_types                             
---------------------------------------------------------+------------------------+---------------------------------------------------------------------------------
 Hdfs                                                    |                        | 
But all my tries to grant exec failed.

What I've tried:

Code: Select all

grant execute on procedure hdfs to username;
grant execute on procedure hdfs() to username;
grant execute on procedure hdfs(url Varchar, username Varchar) to username;
Any help appreciated.

Regards,
JB

Re: HDFS execute permission

Posted: Tue Aug 20, 2013 1:23 pm
by id10t
HI!

What is error?

Re: HDFS execute permission

Posted: Tue Aug 20, 2013 2:29 pm
by scutter
Try using GRANT .. ON FUNCTION instead.

Re: HDFS execute permission

Posted: Wed Aug 21, 2013 3:06 pm
by jean-baptiste.favre
Hello,
After some others tests, I managed to get things working.

My problem was that user did not have sufficient rights on public schema. And Hdfs plugin is installed into it.

So, basically,

Code: Select all

GRANT USAGE ON SCHEMA public TO username
solved the issue.