Codota Logo
JsonLogEntityFactory.getInstance
Code IndexAdd Codota to your IDE (free)

How to use
getInstance
method
in
org.apache.sentry.provider.db.log.entity.JsonLogEntityFactory

Best Java code snippets using org.apache.sentry.provider.db.log.entity.JsonLogEntityFactory.getInstance (Showing top 20 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
Dictionary d =
  • Codota Iconnew Hashtable()
  • Codota IconBundle bundle;bundle.getHeaders()
  • Codota Iconnew Properties()
  • Smart code suggestions by Codota
}
origin: apache/incubator-sentry

@Override
public TCreateSentryRoleResponse create_sentry_role(
  final TCreateSentryRoleRequest request) throws TException {
 Response<Void> respose = requestHandle(new RequestHandler<Void>() {
  @Override
  public Response<Void> handle() throws Exception {
   validateClientVersion(request.getProtocol_version());
   authorize(request.getRequestorUserName(),
     getRequestorGroups(conf, request.getRequestorUserName()));
   CommitContext context = store.createRole(request.getComponent(), request.getRoleName(), request.getRequestorUserName());
   return new Response<Void>(Status.OK(), context);
  }
 });
 TCreateSentryRoleResponse tResponse = new TCreateSentryRoleResponse(respose.status);
 if (Status.OK.getCode() == respose.status.getValue()) {
  handerInvoker.create_sentry_role(respose.context, request, tResponse);
 }
 try {
  AUDIT_LOGGER.info(JsonLogEntityFactory.getInstance()
   .createJsonLogEntity(request, tResponse, conf).toJsonFormatLog());
 } catch (Exception e) {
  // if any exception, log the exception.
  String msg = "Error creating audit log for create role: " + e.getMessage();
  LOGGER.error(msg, e);
 }
 return tResponse;
}
origin: apache/incubator-sentry

@Override
public TDropSentryRoleResponse drop_sentry_role(final TDropSentryRoleRequest request)
  throws TException {
 Response<Void> respose = requestHandle(new RequestHandler<Void>() {
  @Override
  public Response<Void> handle() throws Exception {
   validateClientVersion(request.getProtocol_version());
   authorize(request.getRequestorUserName(),
     getRequestorGroups(conf, request.getRequestorUserName()));
   CommitContext context = store.dropRole(request.getComponent(), request.getRoleName(), request.getRequestorUserName());
   return new Response<Void>(Status.OK(), context);
  }
 });
 TDropSentryRoleResponse tResponse = new TDropSentryRoleResponse(respose.status);
 if (Status.OK.getCode() == respose.status.getValue()) {
  handerInvoker.drop_sentry_role(respose.context, request, tResponse);
 }
 try {
  AUDIT_LOGGER.info(JsonLogEntityFactory.getInstance()
   .createJsonLogEntity(request, tResponse, conf).toJsonFormatLog());
 } catch (Exception e) {
  // if any exception, log the exception.
  String msg = "Error creating audit log for drop role: " + e.getMessage();
  LOGGER.error(msg, e);
 }
 return tResponse;
}
origin: apache/incubator-sentry

@Override
public TAlterSentryRoleGrantPrivilegeResponse alter_sentry_role_grant_privilege(
  final TAlterSentryRoleGrantPrivilegeRequest request) throws TException {
 Response<Void> respose = requestHandle(new RequestHandler<Void>() {
  @Override
  public Response<Void> handle() throws Exception {
   validateClientVersion(request.getProtocol_version());
   CommitContext context = store.alterRoleGrantPrivilege(request.getComponent(), request.getRoleName(), toPrivilegeObject(request.getPrivilege()), request.getRequestorUserName());
   return new Response<Void>(Status.OK(), context);
  }
 });
 TAlterSentryRoleGrantPrivilegeResponse tResponse = new TAlterSentryRoleGrantPrivilegeResponse(respose.status);
 if (Status.OK.getCode() == respose.status.getValue()) {
  handerInvoker.alter_sentry_role_grant_privilege(respose.context, request, tResponse);
 }
 try {
  AUDIT_LOGGER.info(JsonLogEntityFactory.getInstance()
   .createJsonLogEntity(request, tResponse, conf).toJsonFormatLog());
 } catch (Exception e) {
  // if any exception, log the exception.
  String msg = "Error creating audit log for grant privilege to role: " + e.getMessage();
  LOGGER.error(msg, e);
 }
 return tResponse;
}
origin: apache/sentry

@Test
public void testDropRole() {
 TDropSentryRoleRequest request = new TDropSentryRoleRequest();
 TDropSentryRoleResponse response = new TDropSentryRoleResponse();
 request.setRequestorUserName(TEST_USER_NAME);
 request.setRoleName(TEST_ROLE_NAME);
 response.setStatus(Status.OK());
 GMAuditMetadataLogEntity amle = (GMAuditMetadataLogEntity) JsonLogEntityFactory
   .getInstance().createJsonLogEntity(request, response, conf);
 assertCommon(amle, Constants.TRUE, Constants.OPERATION_DROP_ROLE, "DROP ROLE testRole",
   Constants.OBJECT_TYPE_ROLE, new HashMap<String, String>());
 response.setStatus(Status.InvalidInput("", null));
 amle = (GMAuditMetadataLogEntity) JsonLogEntityFactory.getInstance().createJsonLogEntity(
   request, response, conf);
 assertCommon(amle, Constants.FALSE, Constants.OPERATION_DROP_ROLE, "DROP ROLE testRole",
   Constants.OBJECT_TYPE_ROLE, new HashMap<String, String>());
}
origin: apache/incubator-sentry

@Test
public void testDropRole() {
 TDropSentryRoleRequest request = new TDropSentryRoleRequest();
 TDropSentryRoleResponse response = new TDropSentryRoleResponse();
 request.setRequestorUserName(TEST_USER_NAME);
 request.setRoleName(TEST_ROLE_NAME);
 response.setStatus(Status.OK());
 GMAuditMetadataLogEntity amle = (GMAuditMetadataLogEntity) JsonLogEntityFactory
   .getInstance().createJsonLogEntity(request, response, conf);
 assertCommon(amle, Constants.TRUE, Constants.OPERATION_DROP_ROLE, "DROP ROLE testRole",
   Constants.OBJECT_TYPE_ROLE, new HashMap<String, String>());
 response.setStatus(Status.InvalidInput("", null));
 amle = (GMAuditMetadataLogEntity) JsonLogEntityFactory.getInstance().createJsonLogEntity(
   request, response, conf);
 assertCommon(amle, Constants.FALSE, Constants.OPERATION_DROP_ROLE, "DROP ROLE testRole",
   Constants.OBJECT_TYPE_ROLE, new HashMap<String, String>());
}
origin: apache/sentry

@Test
public void testCreateRole() {
 TCreateSentryRoleRequest request = new TCreateSentryRoleRequest();
 TCreateSentryRoleResponse response = new TCreateSentryRoleResponse();
 request.setRequestorUserName(TEST_USER_NAME);
 request.setRoleName(TEST_ROLE_NAME);
 response.setStatus(Status.OK());
 GMAuditMetadataLogEntity amle = (GMAuditMetadataLogEntity) JsonLogEntityFactory.getInstance()
   .createJsonLogEntity(request, response, conf);
 assertCommon(amle, Constants.TRUE, Constants.OPERATION_CREATE_ROLE, "CREATE ROLE testRole",
   Constants.OBJECT_TYPE_ROLE, new HashMap<String, String>());
 response.setStatus(Status.InvalidInput("", null));
 amle = (GMAuditMetadataLogEntity) JsonLogEntityFactory.getInstance().createJsonLogEntity(
   request, response, conf);
 assertCommon(amle, Constants.FALSE, Constants.OPERATION_CREATE_ROLE, "CREATE ROLE testRole",
   Constants.OBJECT_TYPE_ROLE, new HashMap<String, String>());
}
origin: apache/incubator-sentry

@Test
public void testCreateRole() {
 TCreateSentryRoleRequest request = new TCreateSentryRoleRequest();
 TCreateSentryRoleResponse response = new TCreateSentryRoleResponse();
 request.setRequestorUserName(TEST_USER_NAME);
 request.setRoleName(TEST_ROLE_NAME);
 response.setStatus(Status.OK());
 GMAuditMetadataLogEntity amle = (GMAuditMetadataLogEntity) JsonLogEntityFactory.getInstance()
   .createJsonLogEntity(request, response, conf);
 assertCommon(amle, Constants.TRUE, Constants.OPERATION_CREATE_ROLE, "CREATE ROLE testRole",
   Constants.OBJECT_TYPE_ROLE, new HashMap<String, String>());
 response.setStatus(Status.InvalidInput("", null));
 amle = (GMAuditMetadataLogEntity) JsonLogEntityFactory.getInstance().createJsonLogEntity(
   request, response, conf);
 assertCommon(amle, Constants.FALSE, Constants.OPERATION_CREATE_ROLE, "CREATE ROLE testRole",
   Constants.OBJECT_TYPE_ROLE, new HashMap<String, String>());
}
origin: apache/incubator-sentry

@Test
public void testDeleteRole() {
 TAlterSentryRoleDeleteGroupsRequest request = new TAlterSentryRoleDeleteGroupsRequest();
 TAlterSentryRoleDeleteGroupsResponse response = new TAlterSentryRoleDeleteGroupsResponse();
 request.setRequestorUserName(TEST_USER_NAME);
 request.setRoleName(TEST_ROLE_NAME);
 request.setGroups(getGroups());
 response.setStatus(Status.OK());
 GMAuditMetadataLogEntity amle = (GMAuditMetadataLogEntity) JsonLogEntityFactory
   .getInstance().createJsonLogEntity(request, response, conf);
 assertCommon(amle, Constants.TRUE, Constants.OPERATION_DELETE_ROLE,
   "REVOKE ROLE testRole FROM GROUP testGroup", Constants.OBJECT_TYPE_ROLE,
   new HashMap<String, String>());
 response.setStatus(Status.InvalidInput("", null));
 amle = (GMAuditMetadataLogEntity) JsonLogEntityFactory.getInstance().createJsonLogEntity(
   request, response, conf);
 assertCommon(amle, Constants.FALSE, Constants.OPERATION_DELETE_ROLE,
   "REVOKE ROLE testRole FROM GROUP testGroup", Constants.OBJECT_TYPE_ROLE,
   new HashMap<String, String>());
}
origin: apache/sentry

@Test
public void testAddRole() {
 TAlterSentryRoleAddGroupsRequest request = new TAlterSentryRoleAddGroupsRequest();
 TAlterSentryRoleAddGroupsResponse response = new TAlterSentryRoleAddGroupsResponse();
 request.setRequestorUserName(TEST_USER_NAME);
 request.setRoleName(TEST_ROLE_NAME);
 request.setGroups(getGroups());
 response.setStatus(Status.OK());
 GMAuditMetadataLogEntity amle = (GMAuditMetadataLogEntity) JsonLogEntityFactory.getInstance()
   .createJsonLogEntity(request, response, conf);
 assertCommon(amle, Constants.TRUE, Constants.OPERATION_ADD_ROLE,
   "GRANT ROLE testRole TO GROUP testGroup", Constants.OBJECT_TYPE_ROLE,
   new HashMap<String, String>());
 response.setStatus(Status.InvalidInput("", null));
 amle = (GMAuditMetadataLogEntity) JsonLogEntityFactory.getInstance().createJsonLogEntity(
   request, response, conf);
 assertCommon(amle, Constants.FALSE, Constants.OPERATION_ADD_ROLE,
   "GRANT ROLE testRole TO GROUP testGroup", Constants.OBJECT_TYPE_ROLE,
   new HashMap<String, String>());
}
origin: apache/sentry

@Test
public void testDeleteRole() {
 TAlterSentryRoleDeleteGroupsRequest request = new TAlterSentryRoleDeleteGroupsRequest();
 TAlterSentryRoleDeleteGroupsResponse response = new TAlterSentryRoleDeleteGroupsResponse();
 request.setRequestorUserName(TEST_USER_NAME);
 request.setRoleName(TEST_ROLE_NAME);
 request.setGroups(getGroups());
 response.setStatus(Status.OK());
 GMAuditMetadataLogEntity amle = (GMAuditMetadataLogEntity) JsonLogEntityFactory
   .getInstance().createJsonLogEntity(request, response, conf);
 assertCommon(amle, Constants.TRUE, Constants.OPERATION_DELETE_ROLE,
   "REVOKE ROLE testRole FROM GROUP testGroup", Constants.OBJECT_TYPE_ROLE,
   new HashMap<String, String>());
 response.setStatus(Status.InvalidInput("", null));
 amle = (GMAuditMetadataLogEntity) JsonLogEntityFactory.getInstance().createJsonLogEntity(
   request, response, conf);
 assertCommon(amle, Constants.FALSE, Constants.OPERATION_DELETE_ROLE,
   "REVOKE ROLE testRole FROM GROUP testGroup", Constants.OBJECT_TYPE_ROLE,
   new HashMap<String, String>());
}
origin: apache/incubator-sentry

@Test
public void testAddRole() {
 TAlterSentryRoleAddGroupsRequest request = new TAlterSentryRoleAddGroupsRequest();
 TAlterSentryRoleAddGroupsResponse response = new TAlterSentryRoleAddGroupsResponse();
 request.setRequestorUserName(TEST_USER_NAME);
 request.setRoleName(TEST_ROLE_NAME);
 request.setGroups(getGroups());
 response.setStatus(Status.OK());
 GMAuditMetadataLogEntity amle = (GMAuditMetadataLogEntity) JsonLogEntityFactory.getInstance()
   .createJsonLogEntity(request, response, conf);
 assertCommon(amle, Constants.TRUE, Constants.OPERATION_ADD_ROLE,
   "GRANT ROLE testRole TO GROUP testGroup", Constants.OBJECT_TYPE_ROLE,
   new HashMap<String, String>());
 response.setStatus(Status.InvalidInput("", null));
 amle = (GMAuditMetadataLogEntity) JsonLogEntityFactory.getInstance().createJsonLogEntity(
   request, response, conf);
 assertCommon(amle, Constants.FALSE, Constants.OPERATION_ADD_ROLE,
   "GRANT ROLE testRole TO GROUP testGroup", Constants.OBJECT_TYPE_ROLE,
   new HashMap<String, String>());
}
origin: apache/incubator-sentry

@Test
public void testCreateRole() {
 TCreateSentryRoleRequest request = new TCreateSentryRoleRequest();
 TCreateSentryRoleResponse response = new TCreateSentryRoleResponse();
 request.setRequestorUserName(TEST_USER_NAME);
 request.setRoleName(TEST_ROLE_NAME);
 response.setStatus(Status.OK());
 DBAuditMetadataLogEntity amle = (DBAuditMetadataLogEntity) JsonLogEntityFactory
   .getInstance().createJsonLogEntity(request, response, conf);
 assertCommon(amle, Constants.TRUE, Constants.OPERATION_CREATE_ROLE,
   "CREATE ROLE testRole", null, null, null, Constants.OBJECT_TYPE_ROLE);
 response.setStatus(Status.InvalidInput("", null));
 amle = (DBAuditMetadataLogEntity) JsonLogEntityFactory.getInstance()
   .createJsonLogEntity(request, response, conf);
 assertCommon(amle, Constants.FALSE, Constants.OPERATION_CREATE_ROLE,
   "CREATE ROLE testRole", null, null, null, Constants.OBJECT_TYPE_ROLE);
}
origin: apache/sentry

@Test
public void testDropRole() {
 TDropSentryRoleRequest request = new TDropSentryRoleRequest();
 TDropSentryRoleResponse response = new TDropSentryRoleResponse();
 request.setRequestorUserName(TEST_USER_NAME);
 request.setRoleName(TEST_ROLE_NAME);
 response.setStatus(Status.OK());
 DBAuditMetadataLogEntity amle = (DBAuditMetadataLogEntity) JsonLogEntityFactory
   .getInstance().createJsonLogEntity(request, response, conf);
 assertCommon(amle, Constants.TRUE, Constants.OPERATION_DROP_ROLE,
   "DROP ROLE testRole", null, null, null, Constants.OBJECT_TYPE_ROLE);
 response.setStatus(Status.InvalidInput("", null));
 amle = (DBAuditMetadataLogEntity) JsonLogEntityFactory.getInstance()
   .createJsonLogEntity(request, response, conf);
 assertCommon(amle, Constants.FALSE, Constants.OPERATION_DROP_ROLE,
   "DROP ROLE testRole", null, null, null, Constants.OBJECT_TYPE_ROLE);
}
origin: apache/incubator-sentry

@Test
public void testDropRole() {
 TDropSentryRoleRequest request = new TDropSentryRoleRequest();
 TDropSentryRoleResponse response = new TDropSentryRoleResponse();
 request.setRequestorUserName(TEST_USER_NAME);
 request.setRoleName(TEST_ROLE_NAME);
 response.setStatus(Status.OK());
 DBAuditMetadataLogEntity amle = (DBAuditMetadataLogEntity) JsonLogEntityFactory
   .getInstance().createJsonLogEntity(request, response, conf);
 assertCommon(amle, Constants.TRUE, Constants.OPERATION_DROP_ROLE,
   "DROP ROLE testRole", null, null, null, Constants.OBJECT_TYPE_ROLE);
 response.setStatus(Status.InvalidInput("", null));
 amle = (DBAuditMetadataLogEntity) JsonLogEntityFactory.getInstance()
   .createJsonLogEntity(request, response, conf);
 assertCommon(amle, Constants.FALSE, Constants.OPERATION_DROP_ROLE,
   "DROP ROLE testRole", null, null, null, Constants.OBJECT_TYPE_ROLE);
}
origin: apache/sentry

@Test
public void testCreateRole() {
 TCreateSentryRoleRequest request = new TCreateSentryRoleRequest();
 TCreateSentryRoleResponse response = new TCreateSentryRoleResponse();
 request.setRequestorUserName(TEST_USER_NAME);
 request.setRoleName(TEST_ROLE_NAME);
 response.setStatus(Status.OK());
 DBAuditMetadataLogEntity amle = (DBAuditMetadataLogEntity) JsonLogEntityFactory
   .getInstance().createJsonLogEntity(request, response, conf);
 assertCommon(amle, Constants.TRUE, Constants.OPERATION_CREATE_ROLE,
   "CREATE ROLE testRole", null, null, null, Constants.OBJECT_TYPE_ROLE);
 response.setStatus(Status.InvalidInput("", null));
 amle = (DBAuditMetadataLogEntity) JsonLogEntityFactory.getInstance()
   .createJsonLogEntity(request, response, conf);
 assertCommon(amle, Constants.FALSE, Constants.OPERATION_CREATE_ROLE,
   "CREATE ROLE testRole", null, null, null, Constants.OBJECT_TYPE_ROLE);
}
origin: apache/incubator-sentry

@Test
public void testDeleteRole() {
 TAlterSentryRoleDeleteGroupsRequest request = new TAlterSentryRoleDeleteGroupsRequest();
 TAlterSentryRoleDeleteGroupsResponse response = new TAlterSentryRoleDeleteGroupsResponse();
 request.setRequestorUserName(TEST_USER_NAME);
 request.setRoleName(TEST_ROLE_NAME);
 request.setGroups(getGroups());
 response.setStatus(Status.OK());
 DBAuditMetadataLogEntity amle = (DBAuditMetadataLogEntity) JsonLogEntityFactory
   .getInstance().createJsonLogEntity(request, response, conf);
 assertCommon(amle, Constants.TRUE, Constants.OPERATION_DELETE_ROLE,
   "REVOKE ROLE testRole FROM GROUP testGroup", null, null, null,
   Constants.OBJECT_TYPE_ROLE);
 response.setStatus(Status.InvalidInput("", null));
 amle = (DBAuditMetadataLogEntity) JsonLogEntityFactory.getInstance()
   .createJsonLogEntity(request, response, conf);
 assertCommon(amle, Constants.FALSE, Constants.OPERATION_DELETE_ROLE,
   "REVOKE ROLE testRole FROM GROUP testGroup", null, null, null,
   Constants.OBJECT_TYPE_ROLE);
}
origin: apache/incubator-sentry

@Test
public void testAddRole() {
 TAlterSentryRoleAddGroupsRequest request = new TAlterSentryRoleAddGroupsRequest();
 TAlterSentryRoleAddGroupsResponse response = new TAlterSentryRoleAddGroupsResponse();
 request.setRequestorUserName(TEST_USER_NAME);
 request.setRoleName(TEST_ROLE_NAME);
 request.setGroups(getGroups());
 response.setStatus(Status.OK());
 DBAuditMetadataLogEntity amle = (DBAuditMetadataLogEntity) JsonLogEntityFactory
   .getInstance().createJsonLogEntity(request, response, conf);
 assertCommon(amle, Constants.TRUE, Constants.OPERATION_ADD_ROLE,
   "GRANT ROLE testRole TO GROUP testGroup", null, null, null,
   Constants.OBJECT_TYPE_ROLE);
 response.setStatus(Status.InvalidInput("", null));
 amle = (DBAuditMetadataLogEntity) JsonLogEntityFactory.getInstance()
   .createJsonLogEntity(request, response, conf);
 assertCommon(amle, Constants.FALSE, Constants.OPERATION_ADD_ROLE,
   "GRANT ROLE testRole TO GROUP testGroup", null, null, null,
   Constants.OBJECT_TYPE_ROLE);
}
origin: apache/sentry

@Test
public void testDeleteRole() {
 TAlterSentryRoleDeleteGroupsRequest request = new TAlterSentryRoleDeleteGroupsRequest();
 TAlterSentryRoleDeleteGroupsResponse response = new TAlterSentryRoleDeleteGroupsResponse();
 request.setRequestorUserName(TEST_USER_NAME);
 request.setRoleName(TEST_ROLE_NAME);
 request.setGroups(getGroups());
 response.setStatus(Status.OK());
 DBAuditMetadataLogEntity amle = (DBAuditMetadataLogEntity) JsonLogEntityFactory
   .getInstance().createJsonLogEntity(request, response, conf);
 assertCommon(amle, Constants.TRUE, Constants.OPERATION_DELETE_ROLE,
   "REVOKE ROLE testRole FROM GROUP testGroup", null, null, null,
   Constants.OBJECT_TYPE_ROLE);
 response.setStatus(Status.InvalidInput("", null));
 amle = (DBAuditMetadataLogEntity) JsonLogEntityFactory.getInstance()
   .createJsonLogEntity(request, response, conf);
 assertCommon(amle, Constants.FALSE, Constants.OPERATION_DELETE_ROLE,
   "REVOKE ROLE testRole FROM GROUP testGroup", null, null, null,
   Constants.OBJECT_TYPE_ROLE);
}
origin: apache/sentry

@Test
public void testAddRole() {
 TAlterSentryRoleAddGroupsRequest request = new TAlterSentryRoleAddGroupsRequest();
 TAlterSentryRoleAddGroupsResponse response = new TAlterSentryRoleAddGroupsResponse();
 request.setRequestorUserName(TEST_USER_NAME);
 request.setRoleName(TEST_ROLE_NAME);
 request.setGroups(getGroups());
 response.setStatus(Status.OK());
 DBAuditMetadataLogEntity amle = (DBAuditMetadataLogEntity) JsonLogEntityFactory
   .getInstance().createJsonLogEntity(request, response, conf);
 assertCommon(amle, Constants.TRUE, Constants.OPERATION_ADD_ROLE,
   "GRANT ROLE testRole TO GROUP testGroup", null, null, null,
   Constants.OBJECT_TYPE_ROLE);
 response.setStatus(Status.InvalidInput("", null));
 amle = (DBAuditMetadataLogEntity) JsonLogEntityFactory.getInstance()
   .createJsonLogEntity(request, response, conf);
 assertCommon(amle, Constants.FALSE, Constants.OPERATION_ADD_ROLE,
   "GRANT ROLE testRole TO GROUP testGroup", null, null, null,
   Constants.OBJECT_TYPE_ROLE);
}
origin: apache/sentry

@Test
public void testRevokeRole() {
 TAlterSentryRoleRevokePrivilegeRequest request = new TAlterSentryRoleRevokePrivilegeRequest();
 TAlterSentryRoleRevokePrivilegeResponse response = new TAlterSentryRoleRevokePrivilegeResponse();
 request.setRequestorUserName(TEST_USER_NAME);
 request.setRoleName(TEST_ROLE_NAME);
 TSentryPrivilege privilege = getPrivilege();
 request.setPrivilege(privilege);
 response.setStatus(Status.OK());
 GMAuditMetadataLogEntity amle = (GMAuditMetadataLogEntity) JsonLogEntityFactory.getInstance()
   .createJsonLogEntity(request, response, conf);
 assertCommon(
   amle,
   Constants.TRUE,
   Constants.OPERATION_REVOKE_PRIVILEGE,
   "REVOKE ACTION ON resourceType1 resourceName1 resourceType2 resourceName2 resourceType3 resourceName3 FROM ROLE testRole",
   Constants.OBJECT_TYPE_PRINCIPAL, TEST_PRIVILEGES_MAP);
 response.setStatus(Status.InvalidInput("", null));
 amle = (GMAuditMetadataLogEntity) JsonLogEntityFactory.getInstance().createJsonLogEntity(
   request, response, conf);
 assertCommon(
   amle,
   Constants.FALSE,
   Constants.OPERATION_REVOKE_PRIVILEGE,
   "REVOKE ACTION ON resourceType1 resourceName1 resourceType2 resourceName2 resourceType3 resourceName3 FROM ROLE testRole",
   Constants.OBJECT_TYPE_PRINCIPAL, TEST_PRIVILEGES_MAP);
}
org.apache.sentry.provider.db.log.entityJsonLogEntityFactorygetInstance

Popular methods of JsonLogEntityFactory

  • createJsonLogEntity
  • createCommonGMAMLE
  • createCommonHAMLE
  • createJsonLogEntities
  • createJsonLogEntitys
  • getGroupsStr
  • isAllowed
  • setCommAttrForAMLE
  • getUsersStr
  • toObjectType
  • toOperationType
  • toOperationType

Popular in Java

  • Creating JSON documents from java classes using gson
  • onRequestPermissionsResult (Fragment)
  • orElseThrow (Optional)
  • getResourceAsStream (ClassLoader)
    Returns a stream for the resource with the specified name. See #getResource(String) for a descriptio
  • ByteBuffer (java.nio)
    A buffer for bytes. A byte buffer can be created in either one of the following ways: * #allocate(i
  • Callable (java.util.concurrent)
    A task that returns a result and may throw an exception. Implementors define a single method with no
  • AtomicInteger (java.util.concurrent.atomic)
    An int value that may be updated atomically. See the java.util.concurrent.atomic package specificati
  • Reference (javax.naming)
  • SSLHandshakeException (javax.net.ssl)
    The exception that is thrown when a handshake could not be completed successfully.
  • JFileChooser (javax.swing)
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