ranger-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Zs." <gzsom...@gmail.com>
Subject Re: Periodically refresh a service definition
Date Tue, 29 Jan 2019 11:10:31 GMT
On Tue, Jan 29, 2019 at 9:26 AM Matteo Alessandroni <
matteo.alessandroni@tirasa.net> wrote:

> Hi Zsombor,
>
> On 29/01/19 00:09, Zs. wrote:
>
> Hi,
>
>  The getDefaultRangerPolicies is get called only when a new service is
> created - so no need to re-register the definition, just re-create the
> service, and your service will be called.
>
>
> yes thanks, but the service is created in the "getDefaultRangerPolicies()"
> logic when I register the service definition.
> Anyway, I could change this logic but then is there a way to configure
> Ranger to periodically refresh the service?
>
>

The RangerService.getDefaultRangerPolicies gets called from
ServiceDBStore.createDefaultPolicies, which gets called from
ServiceDBStore.createService, not from ServiceDBStore.createService*Def.*
The Ranger plugins periodically connect to the Admin webapp, to fetch the
latest list of policies, not the other way around.
It's unclear what you want to achieve. From your description, I thought,
that you have an external service, which generates policies, what you would
like to to apply to your HDFS cluster.
If it's the case, then the simplest solution would be for your setup, is to
push the newly generated policies through the REST interface to Ranger
Admin.

Regards,
 Zsombor







> However, why don't you just push the new policies from your external
> services to Ranger admin?
>
>
> Well what is your idea to do that? You mean e.g. creating a standalone
> application that use Ranger REST API to create / update a service?
>
> Thanks.
> Regards,
> Matteo
>
>
> Regards,
> Zsombor
>
>
> On Mon, Jan 28, 2019 at 5:17 PM Matteo Alessandroni <
> matteo.alessandroni@tirasa.net> wrote:
>
>> Hi,
>>
>> I have created a custom service definition that extends
>> "RangerServiceHdfs" and overridden the "getDefaultRangerPolicies()" method
>> so that every time the service definition is registered to Ranger Admin a
>> list of "RangerPolicy" is taken from an external REST service and added to
>> Ranger.
>>
>> Would it be possible to periodically refresh a service definition? I mean
>> like automatically delete and re-register it?
>>
>> Thanks!
>> Best regards,
>> Matteo
>>
>>
>> --
>>
>> Dott. Matteo Alessandroni
>>
>> Software Engineer @ Tirasa S.r.l.
>>
>> Viale Vittoria Colonna, 97 - 65127 Pescara
>> Tel +39 0859116307 / FAX +39 0859111173
>> http://www.tirasa.net
>>
>> Apache Syncope PMC Member
>> http://people.apache.org/phonebook.html?uid=skylark17
>> [image: Tirasa S.r.l.] <http://www.tirasa.net>
>>
>
> --
>
> Dott. Matteo Alessandroni
>
> Software Engineer @ Tirasa S.r.l.
>
> Viale Vittoria Colonna, 97 - 65127 Pescara
> Tel +39 0859116307 / FAX +39 0859111173
> http://www.tirasa.net
>
> Apache Syncope PMC Member
> http://people.apache.org/phonebook.html?uid=skylark17
> [image: Tirasa S.r.l.] <http://www.tirasa.net>
>

Mime
View raw message