use of org.apache.hadoop.hive.ql.scheduled.ScheduledQueryMaintenanceWork in project hive by apache.
the class ScheduledQueryAnalyzer method analyzeInternal.
@Override
public void analyzeInternal(ASTNode ast) throws SemanticException {
ScheduledQueryMaintenanceWork work;
ScheduledQueryMaintenanceRequestType type = translateAstType(ast.getToken().getType());
ScheduledQuery parsedSchq = interpretAstNode(ast);
ScheduledQuery schq = fillScheduledQuery(type, parsedSchq);
checkAuthorization(type, schq);
LOG.info("scheduled query operation: " + type + " " + schq);
try {
schq.validate();
} catch (TException e) {
throw new SemanticException("ScheduledQuery is invalid", e);
}
work = new ScheduledQueryMaintenanceWork(type, schq);
rootTasks.add(TaskFactory.get(work));
queryState.setCommandType(toHiveOperation(type));
}
Aggregations