prestodb / presto

The official home of the Presto distributed SQL query engine for big data
http://prestodb.io
Apache License 2.0
16.01k stars 5.36k forks source link

Presto integrated ranger error #18200

Closed chufa closed 1 year ago

chufa commented 2 years ago

there are some steps: 1、Installed ranger-presto-plugin successfully; ./enable-presto-plugin.sh some message: Property access-control.name updated successfully with : 'ranger' Linking config files Ranger Plugin for presto has been enabled. Please restart presto to ensure that changes are effective. 2、I will run the presto in idea this is ranger plugin setting and all the config will be writen into presto project path

some errors: com.google.inject.CreationException: Unable to create injector, see the following errors:

1) Error injecting constructor, java.lang.RuntimeException: java.lang.ClassNotFoundException: org.apache.ranger.authorization.presto.authorizer.RangerSystemAccessControl at org.apache.ranger.authorization.presto.authorizer.RangerSystemAccessControl.(RangerSystemAccessControl.java:38) at org.apache.ranger.authorization.presto.authorizer.RangerSystemAccessControlFactory.lambda$create$0(RangerSystemAccessControlFactory.java:45) while locating org.apache.ranger.authorization.presto.authorizer.RangerSystemAccessControl

1 error

agrawalreetika commented 2 years ago

Hi @chufa, You can use Ranger-Based Authorization for Hive connector by using the required configuration in your hive catalog configuration - https://prestodb.io/docs/current/connector/hive-security.html#hive-ranger-based-authorization This is supported in presto-0.275 or later. Let me know if you have any questions.

chufa commented 2 years ago

Thans

I have solved the problem, the presto spi implemented by ranger is io.prestsql.spi, and the presto I need to integrate is the facebook version, and this io.prestsql.spi implementation needs to be noted that the associated packages need to be changed to facebook dependencies package, otherwise the above error will be generated

    <dependency>
        <groupId>com.facebook.presto</groupId>
        <artifactId>presto-spi</artifactId>
    </dependency>

    <dependency>
        <groupId>com.facebook.airlift</groupId>
        <artifactId>bootstrap</artifactId>
    </dependency>

    <dependency>
        <groupId>com.facebook.airlift</groupId>
        <artifactId>log</artifactId>
    </dependency>

    <dependency>
        <groupId>com.facebook.airlift</groupId>
        <artifactId>configuration</artifactId>
    </dependency>
pratyakshsharma commented 1 year ago

I guess we can close this issue.

@chufa Feel free to reopen in case you are still having any troubles.