[
https://issues.apache.org/jira/browse/SENTRY-362?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14073920#comment-14073920
]
Gregory Chanan commented on SENTRY-362:
---------------------------------------
bq. think if the sentry use the db store, it doesn't need any configuration
from hadoop. so it shouldn't keep the original. But if sentry use the file
store, it should download the policy.ini from the HDFS. if the user set the
hive.sentry.provider.resource=/solr/provider.ini not the
hdfs://localhost:8020/solr/provider.ini. the FileProviderBackend need the
fs.default.name parameter to look for which HDFS is. Because the solr service
doesn't have core-site.xml in its default classpath, it should set the
solr.hdfs.confdir parameter to get the hdfs configuration and these should be
merged into solrAuthConf. Merging the hadoop configuration into solrAuthConf
has another good point is that it can change the hdfs according the
solr.hdfs.confdir parameter. That's my consideration, please comment me if I
have mistakes. Thank you very much
hi [~guoquan] I'm not sure if you are agreeing or disagreeing. I'm suggesting
we always use the authzConf as the basis for the configuration and always add
the hdfs properties (assuming solr.hdfs.confdir is set). That is, the behavior
should be indepenedent of the backend provider used. Then, we'll let the
backend provider worry about whether it needs those configuration settings or
not. The file provider will use them and the db store will just ignore them,
because they are never used. Do you agree or disagree with this approach?
> When sentry integrate into solr, the create instance of backend needs
> configure parameters from solrAuthzConf not hadoopConf
> ----------------------------------------------------------------------------------------------------------------------------
>
> Key: SENTRY-362
> URL: https://issues.apache.org/jira/browse/SENTRY-362
> Project: Sentry
> Issue Type: Bug
> Affects Versions: 1.3.0
> Reporter: guoquanshen
> Assignee: guoquanshen
> Attachments: SENTRY-362.patch, SENTRY-362.patch
>
>
> whatever Sentry Solr plugin integration with db store or file store, the
> create instance of DBProviderBackend of FIleProviderBackend should get the
> configuration from sentry-site.xml not hadoop configuration. The following
> code isn't correct:
> {code:title=SolrAuthzBinding.java}
> Configuration conf = getConf();
> providerBackend =(ProviderBackend)
> providerBackendConstructor.newInstance(new Object[] {conf, resourceName});
> {code}
--
This message was sent by Atlassian JIRA
(v6.2#6252)