use of org.apache.hadoop.hive.ql.ddl.privilege.show.principals.ShowPrincipalsDesc in project hive by apache.
the class HiveAuthorizationTaskFactoryImpl method createShowRolePrincipalsTask.
@Override
public Task<?> createShowRolePrincipalsTask(ASTNode ast, Path resFile, Set<ReadEntity> inputs, Set<WriteEntity> outputs) throws SemanticException {
String roleName;
if (ast.getChildCount() == 1) {
roleName = ast.getChild(0).getText();
} else {
// the parser should not allow this
throw new AssertionError("Unexpected Tokens in SHOW ROLE PRINCIPALS");
}
ShowPrincipalsDesc showPrincipalsDesc = new ShowPrincipalsDesc(roleName, resFile.toString());
return TaskFactory.get(new DDLWork(inputs, outputs, showPrincipalsDesc));
}
Aggregations