Search in sources :

Example 6 with QueryMetadata

use of com.facebook.presto.spi.eventlistener.QueryMetadata in project presto by prestodb.

the class QueryMonitor method queryImmediateFailureEvent.

public void queryImmediateFailureEvent(BasicQueryInfo queryInfo, ExecutionFailureInfo failure) {
    eventListenerManager.queryCompleted(new QueryCompletedEvent(new QueryMetadata(queryInfo.getQueryId().toString(), queryInfo.getSession().getTransactionId().map(TransactionId::toString), queryInfo.getQuery(), queryInfo.getPreparedQuery(), queryInfo.getState().toString(), queryInfo.getSelf(), Optional.empty(), Optional.empty(), Optional.empty(), ImmutableList.of(), queryInfo.getSession().getTraceToken()), new QueryStatistics(ofMillis(0), ofMillis(0), ofMillis(0), ofMillis(queryInfo.getQueryStats().getWaitingForPrerequisitesTime().toMillis()), ofMillis(queryInfo.getQueryStats().getQueuedTime().toMillis()), ofMillis(0), ofMillis(0), ofMillis(0), ofMillis(0), ofMillis(0), Optional.empty(), ofMillis(0), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, true, new RuntimeStats()), createQueryContext(queryInfo.getSession(), queryInfo.getResourceGroupId()), new QueryIOMetadata(ImmutableList.of(), Optional.empty()), createQueryFailureInfo(failure, Optional.empty()), ImmutableList.of(), queryInfo.getQueryType(), ImmutableList.of(), ofEpochMilli(queryInfo.getQueryStats().getCreateTime().getMillis()), ofEpochMilli(queryInfo.getQueryStats().getEndTime().getMillis()), ofEpochMilli(queryInfo.getQueryStats().getEndTime().getMillis()), ImmutableList.of(), ImmutableList.of(), Optional.empty()));
    logQueryTimeline(queryInfo);
}
Also used : QueryMetadata(com.facebook.presto.spi.eventlistener.QueryMetadata) QueryCompletedEvent(com.facebook.presto.spi.eventlistener.QueryCompletedEvent) QueryStatistics(com.facebook.presto.spi.eventlistener.QueryStatistics) RuntimeStats(com.facebook.presto.common.RuntimeStats) QueryIOMetadata(com.facebook.presto.spi.eventlistener.QueryIOMetadata)

Aggregations

QueryCompletedEvent (com.facebook.presto.spi.eventlistener.QueryCompletedEvent)6 QueryMetadata (com.facebook.presto.spi.eventlistener.QueryMetadata)6 QueryContext (com.facebook.presto.spi.eventlistener.QueryContext)2 QueryCreatedEvent (com.facebook.presto.spi.eventlistener.QueryCreatedEvent)2 QueryFailureInfo (com.facebook.presto.spi.eventlistener.QueryFailureInfo)2 QueryIOMetadata (com.facebook.presto.spi.eventlistener.QueryIOMetadata)2 QueryStatistics (com.facebook.presto.spi.eventlistener.QueryStatistics)2 ImmutableList (com.google.common.collect.ImmutableList)2 List (java.util.List)2 FailureInfo (com.facebook.presto.client.FailureInfo)1 NodeVersion (com.facebook.presto.client.NodeVersion)1 RuntimeStats (com.facebook.presto.common.RuntimeStats)1 ConnectorId (com.facebook.presto.connector.ConnectorId)1 EventListenerManager (com.facebook.presto.eventlistener.EventListenerManager)1 Column (com.facebook.presto.execution.Column)1 Input (com.facebook.presto.execution.Input)1 QueryInfo (com.facebook.presto.execution.QueryInfo)1 QueryStats (com.facebook.presto.execution.QueryStats)1 StageInfo (com.facebook.presto.execution.StageInfo)1 TaskId (com.facebook.presto.execution.TaskId)1