Search in sources :

Example 1 with ServiceStore

use of org.apache.ranger.plugin.store.ServiceStore in project ranger by apache.

the class RangerAdminTagEnricher method init.

@Override
public void init() {
    if (LOG.isDebugEnabled()) {
        LOG.debug("==> RangerAdminTagEnricher.init()");
    }
    super.init();
    ServiceStore svcStore = tagStore != null ? tagStore.getServiceStore() : null;
    if (tagStore == null || svcStore == null) {
        LOG.error("ServiceDBStore/TagDBStore is not initialized!! Internal Error!");
    } else {
        try {
            RangerService service = svcStore.getServiceByName(serviceName);
            serviceId = service.getId();
        } catch (Exception e) {
            LOG.error("Cannot find service with name:[" + serviceName + "]", e);
            LOG.error("This will cause tag-enricher in Ranger-Admin to fail!!");
        }
    }
    if (LOG.isDebugEnabled()) {
        LOG.debug("<== RangerAdminTagEnricher.init()");
    }
}
Also used : ServiceStore(org.apache.ranger.plugin.store.ServiceStore) RangerService(org.apache.ranger.plugin.model.RangerService)

Aggregations

RangerService (org.apache.ranger.plugin.model.RangerService)1 ServiceStore (org.apache.ranger.plugin.store.ServiceStore)1