Search in sources :

Example 1 with ScheduledQueryMaintenanceRequestType

use of org.apache.hadoop.hive.metastore.api.ScheduledQueryMaintenanceRequestType 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));
}
Also used : TException(org.apache.thrift.TException) ScheduledQueryMaintenanceWork(org.apache.hadoop.hive.ql.scheduled.ScheduledQueryMaintenanceWork) ScheduledQueryMaintenanceRequestType(org.apache.hadoop.hive.metastore.api.ScheduledQueryMaintenanceRequestType) ScheduledQuery(org.apache.hadoop.hive.metastore.api.ScheduledQuery)

Aggregations

ScheduledQuery (org.apache.hadoop.hive.metastore.api.ScheduledQuery)1 ScheduledQueryMaintenanceRequestType (org.apache.hadoop.hive.metastore.api.ScheduledQueryMaintenanceRequestType)1 ScheduledQueryMaintenanceWork (org.apache.hadoop.hive.ql.scheduled.ScheduledQueryMaintenanceWork)1 TException (org.apache.thrift.TException)1