use of org.apache.hadoop.hive.metastore.events.PreDropFunctionEvent in project hive by apache.
the class DropFunctionEvent method getInputHObjs.
private List<HivePrivilegeObject> getInputHObjs() {
if (LOG.isDebugEnabled()) {
LOG.debug("==> DropFunctionEvent.getInputHObjs()");
}
List<HivePrivilegeObject> ret = new ArrayList<>();
PreDropFunctionEvent event = (PreDropFunctionEvent) preEventContext;
Function function = event.getFunction();
List<ResourceUri> uris = function.getResourceUris();
ret.add(new HivePrivilegeObject(HivePrivilegeObject.HivePrivilegeObjectType.FUNCTION, function.getDbName(), function.getFunctionName(), null, null, HivePrivilegeObject.HivePrivObjectActionType.OTHER, null, function.getClassName(), function.getOwnerName(), function.getOwnerType()));
if (uris != null && !uris.isEmpty()) {
for (ResourceUri uri : uris) {
ret.add(new HivePrivilegeObject(HivePrivilegeObject.HivePrivilegeObjectType.DFS_URI, null, uri.getUri()));
}
}
COMMAND_STR = buildCommandString(function);
if (LOG.isDebugEnabled()) {
LOG.debug("<== DropFunctionEvent.getInputHObjs(): ret=" + ret);
}
return ret;
}
Aggregations