15 package com.cloudera.impala.authorization;
18 import java.net.MalformedURLException;
20 import org.apache.hadoop.conf.Configuration;
23 import com.google.common.base.Strings;
37 config_ = FileSystemUtil.getConfiguration();
45 throw new IllegalArgumentException(
"A valid path to a sentry-site.xml config " +
46 "file must be set using --sentry_config to enable authorization.");
50 if (!configFile.exists()) {
51 throw new RuntimeException(
"Sentry configuration file does not exist: " +
55 if (!configFile.canRead()) {
56 throw new RuntimeException(
"Cannot read Sentry configuration file: " +
62 config_.addResource(configFile.toURI().toURL());
63 }
catch (MalformedURLException e) {
64 throw new RuntimeException(
"Invalid Sentry config file path: " +
configFile_, e);
Configuration getConfig()
SentryConfig(String configFilePath)
final Configuration config_