Codota Logo
MSentryRole.getGmPrivileges
Code IndexAdd Codota to your IDE (free)

How to use
getGmPrivileges
method
in
org.apache.sentry.provider.db.service.model.MSentryRole

Best Java code snippets using org.apache.sentry.provider.db.service.model.MSentryRole.getGmPrivileges (Showing top 13 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
OutputStreamWriter o =
  • Codota IconOutputStream out;new OutputStreamWriter(out)
  • Codota IconOutputStream out;String charsetName;new OutputStreamWriter(out, charsetName)
  • Codota IconHttpURLConnection connection;new OutputStreamWriter(connection.getOutputStream())
  • Smart code suggestions by Codota
}
origin: apache/sentry

/**
 * Removes all the privileges associated with
 * a particular role. After this dis-association if the
 * privilege doesn't have any roles associated it will be
 * removed from the underlying persistence layer.
 * @param pm Instance of PersistenceManager
 * @param sentryRole Role for which all the privileges are to be removed.
 */
private void removePrivileges(PersistenceManager pm, MSentryRole sentryRole) {
 List<MSentryPrivilege> privilegesCopy = new ArrayList<>(sentryRole.getPrivileges());
 List<MSentryGMPrivilege> gmPrivilegesCopy = new ArrayList<>(sentryRole.getGmPrivileges());
 sentryRole.removePrivileges();
 // with SENTRY-398 generic model
 sentryRole.removeGMPrivileges();
 removeStaledPrivileges(pm, privilegesCopy);
 removeStaledGMPrivileges(pm, gmPrivilegesCopy);
}
origin: apache/sentry

 grantPrivilege.setAction(ac.getValue());
 MSentryGMPrivilege existPriv = getPrivilege(grantPrivilege, pm);
 if (existPriv != null && role.getGmPrivileges().contains(existPriv)) {
if (allPrivilege != null && role.getGmPrivileges().contains(allPrivilege)) {
 return;
origin: apache/incubator-sentry

 grantPrivilege.setAction(ac.getValue());
 MSentryGMPrivilege existPriv = getPrivilege(grantPrivilege, pm);
 if (existPriv != null && role.getGmPrivileges().contains(existPriv)) {
if (allPrivilege != null && role.getGmPrivileges().contains(allPrivilege)) {
 return;
origin: apache/sentry

pm.retrieve(role);
assertEquals(1, role.getPrivileges().size());
assertEquals(1, role.getGmPrivileges().size());
commitTransaction(pm);
solrPrivilege = (MSentryGMPrivilege)role.getGmPrivileges().toArray()[0];
solrPrivilege.removeRole(role);
pm.makePersistent(solrPrivilege);
pm.retrieve(role);
assertEquals(1, role.getPrivileges().size());
assertEquals(0, role.getGmPrivileges().size());
commitTransaction(pm);
pm.retrieve(role);
assertEquals(0, role.getPrivileges().size());
assertEquals(0, role.getGmPrivileges().size());
commitTransaction(pm);
origin: apache/incubator-sentry

pm.retrieve(role);
assertEquals(1, role.getPrivileges().size());
assertEquals(1, role.getGmPrivileges().size());
commitTransaction(pm);
solrPrivilege = (MSentryGMPrivilege)role.getGmPrivileges().toArray()[0];
solrPrivilege.removeRole(role);
pm.makePersistent(solrPrivilege);
pm.retrieve(role);
assertEquals(1, role.getPrivileges().size());
assertEquals(0, role.getGmPrivileges().size());
commitTransaction(pm);
pm.retrieve(role);
assertEquals(0, role.getPrivileges().size());
assertEquals(0, role.getGmPrivileges().size());
commitTransaction(pm);
origin: apache/incubator-sentry

pm.retrieve(role);
assertEquals(1, role.getPrivileges().size());
assertEquals(0, role.getGmPrivileges().size());
commitTransaction(pm);
pm.retrieve(role);
assertEquals(1, role.getPrivileges().size());
assertEquals(1, role.getGmPrivileges().size());
commitTransaction(pm);
origin: apache/sentry

pm.retrieve(role);
assertEquals(1, role.getPrivileges().size());
assertEquals(0, role.getGmPrivileges().size());
commitTransaction(pm);
pm.retrieve(role);
assertEquals(1, role.getPrivileges().size());
assertEquals(1, role.getGmPrivileges().size());
commitTransaction(pm);
origin: apache/incubator-sentry

pm.retrieve(role);
assertEquals(1, role.getPrivileges().size());
assertEquals(1, role.getGmPrivileges().size());
commitTransaction(pm);
role = getMSentryRole(pm, roleName);
pm.retrieve(role);
if (!role.getGmPrivileges().contains(solrPrivilege2)) {
 fail("unexpect happend: the MSentryGMPrivilege:" + solrPrivilege2 + " already be granted");
origin: apache/sentry

pm.retrieve(role);
assertEquals(1, role.getPrivileges().size());
assertEquals(1, role.getGmPrivileges().size());
commitTransaction(pm);
role = getMSentryRole(pm, roleName);
pm.retrieve(role);
if (!role.getGmPrivileges().contains(solrPrivilege2)) {
 fail("unexpect happend: the MSentryGMPrivilege:" + solrPrivilege2 + " already be granted");
origin: apache/incubator-sentry

pm.retrieve(role);
assertEquals(1, role.getPrivileges().size());
assertEquals(1, role.getGmPrivileges().size());
commitTransaction(pm);
pm.retrieve(role);
assertEquals(0, role.getPrivileges().size());
assertEquals(0, role.getGmPrivileges().size());
commitTransaction(pm);
origin: apache/sentry

pm.retrieve(role1);
assertEquals(1, role1.getPrivileges().size());
assertEquals(1, role1.getGmPrivileges().size());
role2 = getMSentryRole(pm, roleName2);
pm.retrieve(role2);
assertEquals(1, role2.getPrivileges().size());
assertEquals(1, role2.getGmPrivileges().size());
commitTransaction(pm);
origin: apache/sentry

pm.retrieve(role);
assertEquals(1, role.getPrivileges().size());
assertEquals(1, role.getGmPrivileges().size());
commitTransaction(pm);
pm.retrieve(role);
assertEquals(0, role.getPrivileges().size());
assertEquals(0, role.getGmPrivileges().size());
commitTransaction(pm);
origin: apache/sentry

pm.retrieve(role);
assertEquals(1, role.getPrivileges().size());
assertEquals(1, role.getGmPrivileges().size());
commitTransaction(pm);
org.apache.sentry.provider.db.service.modelMSentryRolegetGmPrivileges

Popular methods of MSentryRole

  • <init>
  • getGroups
  • getPrivileges
  • removeGMPrivileges
  • removePrivileges
  • getRoleName
  • appendGMPrivilege
  • appendGroup
  • getUsers
  • removeGMPrivilege
  • removeGroup
  • appendPrivilege
  • removeGroup,
  • appendPrivilege,
  • appendUser,
  • removePrivilege,
  • removeUser

Popular in Java

  • Reading from database using SQL prepared statement
  • putExtra (Intent)
  • compareTo (BigDecimal)
    Compares this BigDecimal with the specified BigDecimal. Two BigDecimal objects that are equal in val
  • requestLocationUpdates (LocationManager)
  • ObjectMapper (com.fasterxml.jackson.databind)
    This mapper (or, data binder, or codec) provides functionality for converting between Java objects (
  • MessageDigest (java.security)
    Uses a one-way hash function to turn an arbitrary number of bytes into a fixed-length byte sequence.
  • Locale (java.util)
    A Locale object represents a specific geographical, political, or cultural region. An operation that
  • SSLHandshakeException (javax.net.ssl)
    The exception that is thrown when a handshake could not be completed successfully.
  • IOUtils (org.apache.commons.io)
    General IO stream manipulation utilities. This class provides static utility methods for input/outpu
  • Join (org.hibernate.mapping)
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now