congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
TRoleChanges.addToDelGroups
Code IndexAdd Tabnine to your IDE (free)

How to use
addToDelGroups
method
in
org.apache.sentry.hdfs.service.thrift.TRoleChanges

Best Java code snippets using org.apache.sentry.hdfs.service.thrift.TRoleChanges.addToDelGroups (Showing top 4 results out of 315)

origin: apache/incubator-sentry

@Override
public void onAlterSentryRoleDeleteGroups(
  TAlterSentryRoleDeleteGroupsRequest request)
    throws SentryPluginException {
 PermissionsUpdate update = new PermissionsUpdate(permSeqNum.incrementAndGet(), false);
 TRoleChanges rUpdate = update.addRoleUpdate(request.getRoleName());
 for (TSentryGroup group : request.getGroups()) {
  rUpdate.addToDelGroups(group.getGroupName());
 }
 permsUpdater.handleUpdateNotification(update);
 LOGGER.debug("Authz Perm preUpdate [" + update.getSeqNum() + ", " + request.getRoleName() + "]..");
}
origin: apache/incubator-sentry

@Override
public void onDropSentryRole(TDropSentryRoleRequest request)
  throws SentryPluginException {
 PermissionsUpdate update = new PermissionsUpdate(permSeqNum.incrementAndGet(), false);
 update.addPrivilegeUpdate(PermissionsUpdate.ALL_AUTHZ_OBJ).putToDelPrivileges(
   request.getRoleName(), PermissionsUpdate.ALL_AUTHZ_OBJ);
 update.addRoleUpdate(request.getRoleName()).addToDelGroups(PermissionsUpdate.ALL_GROUPS);
 permsUpdater.handleUpdateNotification(update);
 LOGGER.debug("Authz Perm preUpdate [" + update.getSeqNum() + ", " + request.getRoleName() + "]..");
}
origin: apache/sentry

TRoleChanges delrUpdate = delUpdate.addRoleUpdate(roleName);
for (TSentryGroup g : groups) {
 delrUpdate.addToDelGroups(g.getGroupName());
origin: apache/sentry

@Test
public void testCreateDropRoleWithPermUpdate() throws Exception {
 String roleName = "test-drop-role";
 createRole(roleName);
 // Generate the permission del update for dropping role "test-drop-role"
 PermissionsUpdate delUpdate = new PermissionsUpdate(0, false);
 delUpdate.addPrivilegeUpdate(PermissionsUpdate.ALL_AUTHZ_OBJ).putToDelPrivileges(
     new TPrivilegePrincipal(TPrivilegePrincipalType.ROLE, roleName),
     PermissionsUpdate.ALL_AUTHZ_OBJ);
 delUpdate.addRoleUpdate(roleName).addToDelGroups(PermissionsUpdate.ALL_GROUPS);
 // Drop the role and verify.
 sentryStore.dropSentryRole(roleName, delUpdate);
 checkRoleDoesNotExist(roleName);
 // Query the persisted perm change and ensure it equals to the original one
 long lastChangeID = sentryStore.getLastProcessedPermChangeID();
 MSentryPermChange delPermChange = sentryStore.getMSentryPermChangeByID(lastChangeID);
 assertEquals(delUpdate.JSONSerialize(), delPermChange.getPermChange());
}
org.apache.sentry.hdfs.service.thriftTRoleChangesaddToDelGroups

Popular methods of TRoleChanges

  • addToAddGroups
  • <init>
    Performs a deep copy on other.
  • getAddGroups
  • getDelGroups
  • getRole
  • equals
  • isSetAddGroups
    Returns true if field addGroups is set (has been assigned a value) and false otherwise
  • isSetDelGroups
    Returns true if field delGroups is set (has been assigned a value) and false otherwise
  • isSetRole
    Returns true if field role is set (has been assigned a value) and false otherwise
  • read
  • setAddGroups
  • setAddGroupsIsSet
  • setAddGroups,
  • setAddGroupsIsSet,
  • setDelGroups,
  • setDelGroupsIsSet,
  • setRole,
  • setRoleIsSet,
  • toString,
  • unsetAddGroups,
  • unsetDelGroups

Popular in Java

  • Finding current android device location
  • getContentResolver (Context)
  • startActivity (Activity)
  • setScale (BigDecimal)
  • BufferedWriter (java.io)
    Wraps an existing Writer and buffers the output. Expensive interaction with the underlying reader is
  • BigDecimal (java.math)
    An immutable arbitrary-precision signed decimal.A value is represented by an arbitrary-precision "un
  • HttpURLConnection (java.net)
    An URLConnection for HTTP (RFC 2616 [http://tools.ietf.org/html/rfc2616]) used to send and receive d
  • BitSet (java.util)
    The BitSet class implements abit array [http://en.wikipedia.org/wiki/Bit_array]. Each element is eit
  • GregorianCalendar (java.util)
    GregorianCalendar is a concrete subclass of Calendarand provides the standard calendar used by most
  • ThreadPoolExecutor (java.util.concurrent)
    An ExecutorService that executes each submitted task using one of possibly several pooled threads, n
  • 21 Best Atom Packages for 2021
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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