Tabnine Logo
SentryConfigurationException
Code IndexAdd Tabnine to your IDE (free)

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

Best Java code snippets using org.apache.sentry.core.common.SentryConfigurationException (Showing top 7 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

private void printConfigErrors(SentryConfigurationException configException)
  throws SentryConfigurationException {
 System.out.println(" *** Found configuration problems *** ");
 for (String errMsg : configException.getConfigErrors()) {
  System.out.println("ERROR: " + errMsg);
 }
 for (String warnMsg : configException.getConfigWarnings()) {
  System.out.println("Warning: " + warnMsg);
 }
 throw configException;
}
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

Most used methods

  • <init>
  • getConfigErrors
  • getConfigWarnings
  • setConfigErrors
  • setConfigWarnings

Popular in Java

  • Reading from database using SQL prepared statement
  • startActivity (Activity)
  • findViewById (Activity)
  • onRequestPermissionsResult (Fragment)
  • Menu (java.awt)
  • URL (java.net)
    A Uniform Resource Locator that identifies the location of an Internet resource as specified by RFC
  • Collections (java.util)
    This class consists exclusively of static methods that operate on or return collections. It contains
  • SortedMap (java.util)
    A map that has its keys ordered. The sorting is according to either the natural ordering of its keys
  • SSLHandshakeException (javax.net.ssl)
    The exception that is thrown when a handshake could not be completed successfully.
  • JCheckBox (javax.swing)
  • Top plugins for Android Studio
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