use of com.datastax.oss.driver.internal.core.cql.DefaultExecutionInfo in project java-driver by datastax.
the class GraphRequestHandler method setFinalError.
private void setFinalError(GraphStatement<?> statement, Throwable error, Node node, int execution) {
DriverExecutionProfile executionProfile = Conversions.resolveExecutionProfile(statement, context);
if (error instanceof DriverException) {
((DriverException) error).setExecutionInfo(new DefaultExecutionInfo(statement, node, startedSpeculativeExecutionsCount.get(), execution, errors, null, null, true, session, context, executionProfile));
}
if (result.completeExceptionally(error)) {
cancelScheduledTasks();
if (!(requestTracker instanceof NoopRequestTracker)) {
long latencyNanos = System.nanoTime() - startTimeNanos;
requestTracker.onError(statement, error, latencyNanos, executionProfile, node, logPrefix);
}
if (error instanceof DriverTimeoutException) {
throttler.signalTimeout(this);
sessionMetricUpdater.incrementCounter(DseSessionMetric.GRAPH_CLIENT_TIMEOUTS, executionProfile.getName());
} else if (!(error instanceof RequestThrottlingException)) {
throttler.signalError(this, error);
}
}
}
Aggregations