use of io.prestosql.spi.security.GroupProvider in project hetu-core by openlookeng.
the class GroupProviderManager method setConfiguredGroupProvider.
private void setConfiguredGroupProvider(String name, Map<String, String> properties) {
requireNonNull(name, "name is null");
requireNonNull(properties, "properties is null");
log.info("-- Loading group provider %s --", name);
GroupProviderFactory groupProviderFactory = groupProviderFactories.get(name);
checkState(groupProviderFactory != null, "Group provider %s is not registered", name);
GroupProvider groupProvider = groupProviderFactory.create(ImmutableMap.copyOf(properties));
checkState(configuredGroupProvider.compareAndSet(Optional.empty(), Optional.of(groupProvider)), "groupProvider is already set");
log.info("-- Loaded group provider %s --", name);
}
Aggregations