Codota Logo
SentryStoreLayer.alterRoleAddGroups
Code IndexAdd Codota to your IDE (free)

How to use
alterRoleAddGroups
method
in
org.apache.sentry.provider.db.generic.service.persistent.SentryStoreLayer

Best Java code snippets using org.apache.sentry.provider.db.generic.service.persistent.SentryStoreLayer.alterRoleAddGroups (Showing top 5 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
BufferedReader b =
  • Codota IconInputStream in;new BufferedReader(new InputStreamReader(in))
  • Codota IconReader in;new BufferedReader(in)
  • Codota IconFile file;new BufferedReader(new FileReader(file))
  • Smart code suggestions by Codota
}
origin: apache/incubator-sentry

@Test
public void testAdminOperation() throws Exception {
 Mockito.when(mockStore.createRole(anyString(), anyString(), anyString()))
   .thenReturn(new CommitContext(SERVER_UUID, SEQ_ID));
 Mockito.when(mockStore.dropRole(anyString(), anyString(), anyString()))
   .thenReturn(new CommitContext(SERVER_UUID, SEQ_ID + 1));
 Mockito.when(mockStore.alterRoleAddGroups(anyString(), anyString(), anySetOf(String.class),anyString()))
   .thenReturn(new CommitContext(SERVER_UUID, SEQ_ID + 2));
 Mockito.when(mockStore.alterRoleDeleteGroups(anyString(), anyString(),anySetOf(String.class), anyString()))
   .thenReturn(new CommitContext(SERVER_UUID, SEQ_ID + 3));
 Mockito.when(mockStore.dropPrivilege(anyString(), any(PrivilegeObject.class), anyString()))
   .thenReturn(new CommitContext(SERVER_UUID, SEQ_ID + 4));
 Mockito.when(mockStore.renamePrivilege(anyString(), anyString(), anyListOf(Authorizable.class),
   anyListOf(Authorizable.class), anyString()))
   .thenReturn(new CommitContext(SERVER_UUID, SEQ_ID + 5));
 testOperation(ADMIN_USER, Status.OK);
}
origin: apache/sentry

 @Override
 public Response<Void> handle() throws Exception {
  validateClientVersion(request.getProtocol_version());
  authorize(request.getRequestorUserName(),
    getRequestorGroups(conf, request.getRequestorUserName()));
  store.alterRoleAddGroups(request.getComponent(),
      request.getRoleName(),
      request.getGroups(),
      request.getRequestorUserName());
  return new Response<Void>(Status.OK());
 }
});
origin: apache/incubator-sentry

 @Override
 public Response<Void> handle() throws Exception {
  validateClientVersion(request.getProtocol_version());
  authorize(request.getRequestorUserName(),
    getRequestorGroups(conf, request.getRequestorUserName()));
  CommitContext context = store.alterRoleAddGroups(request.getComponent(), request.getRoleName(), request.getGroups(), request.getRequestorUserName());
  return new Response<Void>(Status.OK(), context);
 }
});
origin: apache/sentry

Mockito.when(mockStore.alterRoleAddGroups(anyString(), roleName, anySetOf(String.class),anyString()))
 .thenThrow(new SentryNoSuchObjectException("Role: " + roleName));
origin: apache/incubator-sentry

Mockito.when(mockStore.alterRoleAddGroups(anyString(), roleName, anySetOf(String.class),anyString()))
.thenThrow(new SentryNoSuchObjectException("Role: " + roleName + " doesn't exist"));
org.apache.sentry.provider.db.generic.service.persistentSentryStoreLayeralterRoleAddGroups

Javadoc

Add a role to groups.

Popular methods of SentryStoreLayer

  • alterRoleDeleteGroups
    Delete a role from groups.
  • alterRoleGrantPrivilege
    Grant a privilege to role.
  • alterRoleRevokePrivilege
    Revoke a privilege from role.
  • createRole
    Create a role
  • dropPrivilege
    Drop privilege
  • dropRole
    Drop a role
  • getAllRoleNames
    Get all roles name.
  • getPrivilegesByAuthorizable
    Get sentry privileges based on valid active roles and the authorize objects.
  • getPrivilegesByProvider
    get sentry privileges from provider as followings:
  • getRolesByGroups
    Get roles
  • renamePrivilege
    Rename privilege
  • getGroupsByRoles
    Get groups
  • renamePrivilege,
  • getGroupsByRoles,
  • getPrivilegesByRole,
  • getTSentryRolesByGroupName

Popular in Java

  • Creating JSON documents from java classes using gson
  • addToBackStack (FragmentTransaction)
  • scheduleAtFixedRate (ScheduledExecutorService)
    Creates and executes a periodic action that becomes enabled first after the given initial delay, and
  • getContentResolver (Context)
  • Charset (java.nio.charset)
    A charset is a named mapping between Unicode characters and byte sequences. Every Charset can decode
  • Connection (java.sql)
    A connection represents a link from a Java application to a database. All SQL statements and results
  • Collections (java.util)
    This class consists exclusively of static methods that operate on or return collections. It contains
  • SSLHandshakeException (javax.net.ssl)
    The exception that is thrown when a handshake could not be completed successfully.
  • BoxLayout (javax.swing)
  • Reflections (org.reflections)
    Reflections one-stop-shop objectReflections scans your classpath, indexes the metadata, allows you t
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now