Tabnine Logo
TRoleChanges.getDelGroups
Code IndexAdd Tabnine to your IDE (free)

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

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

origin: apache/incubator-sentry

public Object getFieldValue(_Fields field) {
 switch (field) {
 case ROLE:
  return getRole();
 case ADD_GROUPS:
  return getAddGroups();
 case DEL_GROUPS:
  return getDelGroups();
 }
 throw new IllegalStateException();
}
origin: apache/incubator-sentry

private void applyRoleUpdates(PermissionsUpdate update) {
 for (TRoleChanges rUpdate : update.getRoleUpdates()) {
  if (rUpdate.getRole().equals(PermissionsUpdate.ALL_ROLES)) {
   // Request to remove group from all roles
   String groupToRemove = rUpdate.getDelGroups().iterator().next();
   for (RoleInfo rInfo : perms.getAllRoles()) {
    rInfo.delGroup(groupToRemove);
   }
  }
  RoleInfo rInfo = perms.getRoleInfo(rUpdate.getRole());
  for (String group : rUpdate.getAddGroups()) {
   if (rInfo == null) {
    rInfo = new RoleInfo(rUpdate.getRole());
   }
   rInfo.addGroup(group);
  }
  if (rInfo != null) {
   perms.addRoleInfo(rInfo);
   for (String group : rUpdate.getDelGroups()) {
    if (group.equals(PermissionsUpdate.ALL_GROUPS)) {
     perms.delRoleInfo(rInfo.getRole());
     break;
    }
    // If there are no groups to remove, rUpdate.getDelGroups() will
    // return empty list and this code will not be reached
    rInfo.delGroup(group);
   }
  }
 }
}
org.apache.sentry.hdfs.service.thriftTRoleChangesgetDelGroups

Popular methods of TRoleChanges

  • addToAddGroups
  • <init>
    Performs a deep copy on other.
  • addToDelGroups
  • getAddGroups
  • 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

  • Running tasks concurrently on multiple threads
  • findViewById (Activity)
  • requestLocationUpdates (LocationManager)
  • scheduleAtFixedRate (Timer)
  • ObjectMapper (com.fasterxml.jackson.databind)
    ObjectMapper provides functionality for reading and writing JSON, either to and from basic POJOs (Pl
  • Selector (java.nio.channels)
    A controller for the selection of SelectableChannel objects. Selectable channels can be registered w
  • ArrayList (java.util)
    ArrayList is an implementation of List, backed by an array. All optional operations including adding
  • Locale (java.util)
    Locale represents a language/country/variant combination. Locales are used to alter the presentatio
  • Executors (java.util.concurrent)
    Factory and utility methods for Executor, ExecutorService, ScheduledExecutorService, ThreadFactory,
  • JOptionPane (javax.swing)
  • Top plugins for WebStorm
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