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

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

Best Java code snippets using org.apache.sentry.hdfs.service.thrift.TRoleChanges.getAddGroups (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.thriftTRoleChangesgetAddGroups

Popular methods of TRoleChanges

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

  • Making http requests using okhttp
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • addToBackStack (FragmentTransaction)
  • startActivity (Activity)
  • BufferedWriter (java.io)
    Wraps an existing Writer and buffers the output. Expensive interaction with the underlying reader is
  • FileWriter (java.io)
    A specialized Writer that writes to a file in the file system. All write requests made by calling me
  • SocketException (java.net)
    This SocketException may be thrown during socket creation or setting options, and is the superclass
  • Time (java.sql)
    Java representation of an SQL TIME value. Provides utilities to format and parse the time's represen
  • Timer (java.util)
    Timers schedule one-shot or recurring TimerTask for execution. Prefer java.util.concurrent.Scheduled
  • IsNull (org.hamcrest.core)
    Is the value null?
  • Best plugins for Eclipse
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