Tabnine Logo
SentryStoreLayer.renamePrivilege
Code IndexAdd Tabnine to your IDE (free)

How to use
renamePrivilege
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.renamePrivilege (Showing top 5 results out of 315)

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.renamePrivilege(request.getComponent(), request.getServiceName(),
             toAuthorizables(request.getOldAuthorizables()),
             toAuthorizables(request.getNewAuthorizables()),
             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.renamePrivilege(request.getComponent(), request.getServiceName(),
                toAuthorizables(request.getOldAuthorizables()),
                toAuthorizables(request.getNewAuthorizables()),
                request.getRequestorUserName());
  return new Response<Void>(Status.OK(),context);
 }
});
origin: apache/sentry

.thenThrow(new SentryInvalidInputException("Invalid input privilege object"));
Mockito.when(mockStore.renamePrivilege(anyString(), anyString(), anyListOf(Authorizable.class),
  anyListOf(Authorizable.class), anyString()))
.thenThrow(new RuntimeException("Unknown error"));
origin: apache/incubator-sentry

.thenThrow(new SentryInvalidInputException("Invalid input privilege object"));
Mockito.when(mockStore.renamePrivilege(anyString(), anyString(), anyListOf(Authorizable.class),
  anyListOf(Authorizable.class), anyString()))
.thenThrow(new RuntimeException("Unknown error"));
org.apache.sentry.provider.db.generic.service.persistentSentryStoreLayerrenamePrivilege

Javadoc

Rename privilege

Popular methods of SentryStoreLayer

  • alterRoleAddGroups
    Add a role to groups.
  • 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
  • getGroupsByRoles
    Get groups
  • getRolesByGroups,
  • getGroupsByRoles,
  • getPrivilegesByRole,
  • getTSentryRolesByGroupName

Popular in Java

  • Start an intent from android
  • getApplicationContext (Context)
  • setScale (BigDecimal)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • Menu (java.awt)
  • FileWriter (java.io)
    A specialized Writer that writes to a file in the file system. All write requests made by calling me
  • PrintWriter (java.io)
    Wraps either an existing OutputStream or an existing Writerand provides convenience methods for prin
  • List (java.util)
    An ordered collection (also known as a sequence). The user of this interface has precise control ove
  • UUID (java.util)
    UUID is an immutable representation of a 128-bit universally unique identifier (UUID). There are mul
  • Loader (org.hibernate.loader)
    Abstract superclass of object loading (and querying) strategies. This class implements useful common
  • 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