Tabnine Logo
SentryConfigurationException.<init>
Code IndexAdd Tabnine to your IDE (free)

How to use
org.apache.sentry.core.common.SentryConfigurationException
constructor

Best Java code snippets using org.apache.sentry.core.common.SentryConfigurationException.<init> (Showing top 6 results out of 315)

origin: apache/incubator-sentry

@Override
public void validatePolicy(boolean strictValidation)
  throws SentryConfigurationException {
 throw new SentryConfigurationException("Not implemented yet");
}
origin: apache/incubator-sentry

@Override
public void validatePolicy(boolean strictValidation) throws SentryConfigurationException {
 if (!initialized) {
  throw new IllegalStateException("Backend has not been properly initialized");
 }
 List<String> localConfigErrors = Lists.newArrayList(configErrors);
 List<String> localConfigWarnings = Lists.newArrayList(configWarnings);
 if (strictValidation && !localConfigWarnings.isEmpty() || !localConfigErrors.isEmpty()) {
  localConfigErrors.add("Failed to process global policy file " + resourcePath);
  SentryConfigurationException e = new SentryConfigurationException("");
  e.setConfigErrors(localConfigErrors);
  e.setConfigWarnings(localConfigWarnings);
  throw e;
 }
}
origin: apache/incubator-sentry

 @Override
 public void validate(PrivilegeValidatorContext context) throws SentryConfigurationException {
  String privilege = context.getPrivilege();
  Iterable<IndexerModelAuthorizable> authorizables = parsePrivilege(privilege);
  boolean foundIndexerInAuthorizables = false;

  for(IndexerModelAuthorizable authorizable : authorizables) {
   if(authorizable instanceof Indexer) {
    foundIndexerInAuthorizables = true;
    break;
   }
  }
  if(!foundIndexerInAuthorizables) {
   String msg = "Missing indexer object in " + privilege;
   throw new SentryConfigurationException(msg);
  }
 }
}
origin: apache/incubator-sentry

 @Override
 public void validate(PrivilegeValidatorContext context) throws SentryConfigurationException {
  String privilege = context.getPrivilege();
  Iterable<SearchModelAuthorizable> authorizables = parsePrivilege(privilege);
  boolean foundCollectionInAuthorizables = false;

  for(SearchModelAuthorizable authorizable : authorizables) {
   if(authorizable instanceof Collection) {
    foundCollectionInAuthorizables = true;
    break;
   }
  }
  if(!foundCollectionInAuthorizables) {
   String msg = "Missing collection object in " + privilege;
   throw new SentryConfigurationException(msg);
  }
 }
}
origin: apache/incubator-sentry

 configErrors.add("Failed to read policy file " + resourcePath +
  " Error: " + e.getMessage());
 throw new SentryConfigurationException("Error loading policy file " + resourcePath, e);
} catch (IllegalArgumentException e) {
 configErrors.add("Failed to read policy file " + resourcePath +
  " Error: " + e.getMessage());
 throw new SentryConfigurationException("Error loading policy file " + resourcePath, e);
} else if (!allowPerDatabaseSection) {
 String msg = "Per-db policy file is not expected in this configuration.";
 throw new SentryConfigurationException(msg);
} else {
 for(Map.Entry<String, String> entry : filesSection.entrySet()) {
   if(perDbIni.containsKey(PolicyFileConstants.USERS)) {
    configErrors.add("Per-db policy file cannot contain " + PolicyFileConstants.USERS + " section in " +  perDbPolicy);
    throw new SentryConfigurationException("Per-db policy files cannot contain " + PolicyFileConstants.USERS + " section");
    throw new SentryConfigurationException("Per-db policy files cannot contain " + PolicyFileConstants.DATABASES + " section");
origin: apache/incubator-sentry

throw new SentryConfigurationException("Didn't find a hive-site.xml");
org.apache.sentry.core.commonSentryConfigurationException<init>

Popular methods of SentryConfigurationException

  • getConfigErrors
  • getConfigWarnings
  • setConfigErrors
  • setConfigWarnings

Popular in Java

  • Making http post requests using okhttp
  • getSystemService (Context)
  • getExternalFilesDir (Context)
  • getApplicationContext (Context)
  • HttpServer (com.sun.net.httpserver)
    This class implements a simple HTTP server. A HttpServer is bound to an IP address and port number a
  • UnknownHostException (java.net)
    Thrown when a hostname can not be resolved.
  • DecimalFormat (java.text)
    A concrete subclass of NumberFormat that formats decimal numbers. It has a variety of features desig
  • Semaphore (java.util.concurrent)
    A counting semaphore. Conceptually, a semaphore maintains a set of permits. Each #acquire blocks if
  • Response (javax.ws.rs.core)
    Defines the contract between a returned instance and the runtime when an application needs to provid
  • IOUtils (org.apache.commons.io)
    General IO stream manipulation utilities. This class provides static utility methods for input/outpu
  • Top Sublime Text plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now