private static HiveOperationType getHiveOperationType(HiveOperation op) { return HiveOperationType.valueOf(op.name()); }
private static HiveOperationType getHiveOperationType(HiveOperation op) { return HiveOperationType.valueOf(op.name()); }
/** * test that all enums in {@link HiveOperation} match one in @{link HiveOperationType} */ @Test public void checkHiveOperationTypeMatch(){ for (HiveOperation op : HiveOperation.values()) { try { HiveOperationType.valueOf(op.name()); } catch(IllegalArgumentException ex) { // if value is null or not found, exception would get thrown fail("Unable to find corresponding type in HiveOperationType for " + op + " : " + ex ); } } }
object.put("CURRENT_USER", jsonUser); Object jsonOperation = toJson("OPERATION", operation.name(), out, work); if (work.isFormatted()) { object.put("OPERATION", jsonOperation);
object.put("CURRENT_USER", jsonUser); Object jsonOperation = toJson("OPERATION", operation.name(), out, work); if (work.isFormatted()) { object.put("OPERATION", jsonOperation);
private static HiveOperationType getHiveOperationType(HiveOperation op) { return HiveOperationType.valueOf(op.name()); }
LOG.debug("Going to authorize statement " + hiveOp.name() + " for subject " + subject.getName()); if (!authProvider.hasAccess(subject, inputHierarchy, entry.getValue(), activeRoleSet)) { throw new AuthorizationException("User " + subject.getName() + " does not have privileges for " + hiveOp.name()); if (!authProvider.hasAccess(subject, outputHierarchy, requiredOutputPrivileges.get(key), activeRoleSet)) { throw new AuthorizationException("User " + subject.getName() + " does not have privileges for " + hiveOp.name());
LOG.debug("Going to authorize statement " + hiveOp.name() + " for subject " + subject.getName()); stmtAuthPrivileges.getGrantOption(), activeRoleSet)) { throw new AuthorizationException("User " + subject.getName() + " does not have privileges for " + hiveOp.name()); stmtAuthPrivileges.getGrantOption(), activeRoleSet)) { throw new AuthorizationException("User " + subject.getName() + " does not have privileges for " + hiveOp.name());
object.put("CURRENT_USER", jsonUser); Object jsonOperation = toJson("OPERATION", operation.name(), out, work); if (work.isFormatted()) { object.put("OPERATION", jsonOperation);