Class MappingRuleMatchers.UserGroupMatcher

java.lang.Object
org.apache.hadoop.yarn.server.resourcemanager.placement.csmappingrule.MappingRuleMatchers.UserGroupMatcher
All Implemented Interfaces:
MappingRuleMatcher
Enclosing class:
MappingRuleMatchers

public static class MappingRuleMatchers.UserGroupMatcher extends Object implements MappingRuleMatcher
The GroupMatcher will check if any of the user's groups match the provided group name. It does not care if it's primary or secondary group, it just checks if the user is member of the expected group.
  • Method Details

    • match

      public boolean match(VariableContext variables)
      The method will match (return true) if the user is in the provided group. This matcher expect an extraVariableSet to be present in the variable context, if it's not present, we return false. If the expected group is null we always return false.
      Specified by:
      match in interface MappingRuleMatcher
      Parameters:
      variables - The variable context, which contains all the variables
      Returns:
      true if user is member of the group
    • toString

      public String toString()
      Overrides:
      toString in class Object