congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
AccessControlList.removeUser
Code IndexAdd Tabnine to your IDE (free)

How to use
removeUser
method
in
org.apache.hadoop.security.authorize.AccessControlList

Best Java code snippets using org.apache.hadoop.security.authorize.AccessControlList.removeUser (Showing top 9 results out of 315)

origin: org.apache.hadoop/hadoop-common-test

assertEquals("drwho,joe tardis,users", acl.getAclString());
acl.removeUser("joe");
acl.removeGroup("users");
users = acl.getUsers();
assertEquals("drwho ", acl.getAclString());
acl.removeUser("drwho");
assertEquals(0, users.size());
assertFalse(users.contains("drwho"));
origin: org.apache.hadoop/hadoop-common-test

/**
 * Tests adding user/group to an wild card acl.
 */
public void testAddRemoveToWildCardACL() {
 AccessControlList acl = new AccessControlList(" * ");
 assertTrue(acl.isAllAllowed());
 UserGroupInformation drwho =
  UserGroupInformation.createUserForTesting("drwho@APACHE.ORG",
    new String[] { "aliens" });
 UserGroupInformation drwho2 =
  UserGroupInformation.createUserForTesting("drwho2@APACHE.ORG",
    new String[] { "tardis" });
 acl.addUser("drwho");
 assertTrue(acl.isAllAllowed());
 assertFalse(acl.getAclString().contains("drwho"));
 acl.addGroup("tardis");
 assertTrue(acl.isAllAllowed());
 assertFalse(acl.getAclString().contains("tardis"));
  acl.removeUser("drwho");
 assertTrue(acl.isAllAllowed());
 assertUserAllowed(drwho, acl);
 acl.removeGroup("tardis");
 assertTrue(acl.isAllAllowed());
 assertUserAllowed(drwho2, acl);
}
origin: ch.cern.hadoop/hadoop-common

assertEquals("drwho,joe tardis,users", acl.getAclString());
acl.removeUser("joe");
acl.removeGroup("users");
users = acl.getUsers();
assertEquals("drwho ", acl.getAclString());
acl.removeUser("drwho");
assertEquals(0, users.size());
assertFalse(users.contains("drwho"));
origin: com.github.jiayuhan-it/hadoop-common

assertEquals("drwho,joe tardis,users", acl.getAclString());
acl.removeUser("joe");
acl.removeGroup("users");
users = acl.getUsers();
assertEquals("drwho ", acl.getAclString());
acl.removeUser("drwho");
assertEquals(0, users.size());
assertFalse(users.contains("drwho"));
origin: org.apache.hadoop/hadoop-common-test

th = null;
try {
acl.removeUser(" * ");
} catch (Throwable t) {
 th = t;
origin: ch.cern.hadoop/hadoop-common

/**
 * Tests adding user/group to an wild card acl.
 */
@Test
public void testAddRemoveToWildCardACL() {
 AccessControlList acl = new AccessControlList(" * ");
 assertTrue(acl.isAllAllowed());
 UserGroupInformation drwho =
  UserGroupInformation.createUserForTesting("drwho@APACHE.ORG",
    new String[] { "aliens" });
 UserGroupInformation drwho2 =
  UserGroupInformation.createUserForTesting("drwho2@APACHE.ORG",
    new String[] { "tardis" });
 acl.addUser("drwho");
 assertTrue(acl.isAllAllowed());
 assertFalse(acl.getAclString().contains("drwho"));
 acl.addGroup("tardis");
 assertTrue(acl.isAllAllowed());
 assertFalse(acl.getAclString().contains("tardis"));
  acl.removeUser("drwho");
 assertTrue(acl.isAllAllowed());
 assertUserAllowed(drwho, acl);
 acl.removeGroup("tardis");
 assertTrue(acl.isAllAllowed());
 assertUserAllowed(drwho2, acl);
}
origin: com.github.jiayuhan-it/hadoop-common

/**
 * Tests adding user/group to an wild card acl.
 */
@Test
public void testAddRemoveToWildCardACL() {
 AccessControlList acl = new AccessControlList(" * ");
 assertTrue(acl.isAllAllowed());
 UserGroupInformation drwho =
  UserGroupInformation.createUserForTesting("drwho@APACHE.ORG",
    new String[] { "aliens" });
 UserGroupInformation drwho2 =
  UserGroupInformation.createUserForTesting("drwho2@APACHE.ORG",
    new String[] { "tardis" });
 acl.addUser("drwho");
 assertTrue(acl.isAllAllowed());
 assertFalse(acl.getAclString().contains("drwho"));
 acl.addGroup("tardis");
 assertTrue(acl.isAllAllowed());
 assertFalse(acl.getAclString().contains("tardis"));
  acl.removeUser("drwho");
 assertTrue(acl.isAllAllowed());
 assertUserAllowed(drwho, acl);
 acl.removeGroup("tardis");
 assertTrue(acl.isAllAllowed());
 assertUserAllowed(drwho2, acl);
}
origin: ch.cern.hadoop/hadoop-common

th = null;
try {
acl.removeUser(" * ");
} catch (Throwable t) {
 th = t;
origin: com.github.jiayuhan-it/hadoop-common

th = null;
try {
acl.removeUser(" * ");
} catch (Throwable t) {
 th = t;
org.apache.hadoop.security.authorizeAccessControlListremoveUser

Javadoc

Remove user from the names of users allowed for this service.

Popular methods of AccessControlList

  • <init>
    Construct a new ACL from String representation of users and groups The arguments are comma separated
  • isUserAllowed
  • getAclString
    Returns the access control list as a String that can be used for building a new instance by sending
  • addUser
    Add user to the names of users allowed for this service.
  • isAllAllowed
  • toString
    Returns descriptive way of users and groups that are part of this ACL. Use #getAclString() to get th
  • getGroups
  • addGroup
    Add group to the names of groups allowed for this service.
  • isUserInList
    Checks if a user represented by the provided UserGroupInformationis a member of the Access Control L
  • buildACL
    Build ACL from the given two Strings. The Strings contain comma separated values.
  • getGroupsString
    Returns comma-separated concatenated single String of the set 'groups'
  • getString
    Returns comma-separated concatenated single String of all strings of the given set
  • getGroupsString,
  • getString,
  • getUsersString,
  • isWildCardACLValue,
  • readFields,
  • write,
  • getUsers,
  • removeGroup

Popular in Java

  • Updating database using SQL prepared statement
  • scheduleAtFixedRate (Timer)
  • startActivity (Activity)
  • getSupportFragmentManager (FragmentActivity)
  • BufferedImage (java.awt.image)
    The BufferedImage subclass describes an java.awt.Image with an accessible buffer of image data. All
  • BufferedInputStream (java.io)
    A BufferedInputStream adds functionality to another input stream-namely, the ability to buffer the i
  • FileOutputStream (java.io)
    An output stream that writes bytes to a file. If the output file exists, it can be replaced or appen
  • String (java.lang)
  • SSLHandshakeException (javax.net.ssl)
    The exception that is thrown when a handshake could not be completed successfully.
  • SAXParseException (org.xml.sax)
    Encapsulate an XML parse error or warning.> This module, both source code and documentation, is in t
  • 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