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

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

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

Popular methods of TRoleChanges

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

  • Updating database using SQL prepared statement
  • startActivity (Activity)
  • requestLocationUpdates (LocationManager)
  • addToBackStack (FragmentTransaction)
  • HttpServer (com.sun.net.httpserver)
    This class implements a simple HTTP server. A HttpServer is bound to an IP address and port number a
  • Font (java.awt)
    The Font class represents fonts, which are used to render text in a visible way. A font provides the
  • DecimalFormat (java.text)
    A concrete subclass of NumberFormat that formats decimal numbers. It has a variety of features desig
  • TreeSet (java.util)
    TreeSet is an implementation of SortedSet. All optional operations (adding and removing) are support
  • Filter (javax.servlet)
    A filter is an object that performs filtering tasks on either the request to a resource (a servlet o
  • LogFactory (org.apache.commons.logging)
    Factory for creating Log instances, with discovery and configuration features similar to that employ
  • Top 15 Vim Plugins
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