rpoluri edited a comment on issue #528:
URL: https://github.com/apache/submarine/issues/528#issuecomment-791875808


   This is happening when plugin is trying to refresh tags.
   
   From below log, you can see plugin is creating a second RangerBasePlugin 
instance with plugin type `ranger.plugin.hive` instead of `ranger.plugin.spark`
   `
   21/03/06 05:00:23 DEBUG RangerPolicyRepository: ==> 
RangerPolicyRepository.buildContextEnricher(RangerContextEnricherDef={itemId={1}
 name={TagEnricher} 
enricher={org.apache.ranger.plugin.contextenricher.RangerTagEnricher} 
enricherOptions={{tagRetrieverClassName=org.apache.ranger.plugin.contextenricher.RangerAdminTagRetriever,
 tagRefresherPollingInterval=60000}} })
   21/03/06 05:00:23 DEBUG RangerTagEnricher: ==> RangerTagEnricher.init()
   21/03/06 05:00:23 DEBUG RangerAbstractContextEnricher: ==> 
RangerAbstractContextEnricher.init(RangerContextEnricherDef={itemId={1} 
name={TagEnricher} 
enricher={org.apache.ranger.plugin.contextenricher.RangerTagEnricher} 
enricherOptions={{tagRetrieverClassName=org.apache.ranger.plugin.contextenricher.RangerAdminTagRetriever,
 tagRefresherPollingInterval=60000}} })
   21/03/06 05:00:23 DEBUG RangerAbstractContextEnricher: <== 
RangerAbstractContextEnricher.init(RangerContextEnricherDef={itemId={1} 
name={TagEnricher} 
enricher={org.apache.ranger.plugin.contextenricher.RangerTagEnricher} 
enricherOptions={{tagRetrieverClassName=org.apache.ranger.plugin.contextenricher.RangerAdminTagRetriever,
 tagRefresherPollingInterval=60000}} })
   21/03/06 05:00:23 DEBUG RangerBasePlugin: ==> 
RangerBasePlugin.createAdminClient(spark_service, sparkSql, ranger.plugin.hive)
   21/03/06 05:00:23 DEBUG RangerBasePlugin: Value for 
property[ranger.plugin.hive.policy.source.impl] was null or empty. Unexpected! 
Will use policy source of 
type[org.apache.ranger.admin.client.RangerAdminRESTClient]
   21/03/06 05:00:23 DEBUG RangerAdminRESTClient: ==> 
RangerAdminRESTClient.init(, null)
   21/03/06 05:00:23 DEBUG RangerAdminRESTClient: <== 
RangerAdminRESTClient.init(, null)
   21/03/06 05:00:23 DEBUG RangerBasePlugin: <== 
RangerBasePlugin.createAdminClient(spark_service, sparkSql, 
ranger.plugin.hive): policySourceImpl=null, 
client=org.apache.ranger.admin.client.RangerAdminRESTClient@2e1e0032
   
   `
   
   so able to fix/mitigate the issue by adding following entries in 
`ranger-spark-security.xml`
   
   ```
       <property>
           <name>ranger.plugin.hive.policy.source.impl</name>
           <value>org.apache.ranger.admin.client.RangerAdminRESTClient</value>
       </property>
       <property>
           <name>ranger.plugin.hive.policy.rest.url</name>
           <value>http://ranger-host:6080</value>
       </property>
   ```


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to