use of ddf.catalog.operation.impl.ProcessingDetailsImpl in project ddf by codice.
the class SortedQueryMonitor method interruptRemainingSources.
private void interruptRemainingSources(Set<ProcessingDetails> processingDetails, InterruptedException interruptedException) {
for (QueryRequest interruptedSource : futures.values()) {
if (interruptedSource != null) {
String sourceId = getSourceIdFromRequest(interruptedSource);
LOGGER.info("Search interrupted for {}", sourceId);
processingDetails.add(new ProcessingDetailsImpl(sourceId, interruptedException));
}
}
}
use of ddf.catalog.operation.impl.ProcessingDetailsImpl in project ddf by codice.
the class SortedQueryMonitor method executePostFederationQueryPluginsWithSourceError.
private void executePostFederationQueryPluginsWithSourceError(QueryRequest queryRequest, String sourceId, Exception e, Set<ProcessingDetails> processingDetails) {
ProcessingDetails processingDetail = new ProcessingDetailsImpl(sourceId, e);
SourceResponse sourceResponse = new SourceResponseImpl(queryRequest, new ArrayList<>());
sourceResponse.getProcessingErrors().add(processingDetail);
processingDetails.add(processingDetail);
executePostFederationQueryPlugins(sourceResponse, queryRequest);
}
use of ddf.catalog.operation.impl.ProcessingDetailsImpl in project ddf by codice.
the class SolrCacheSource method query.
@Override
public SourceResponse query(QueryRequest request) throws UnsupportedQueryException {
final QueryResponseImpl queryResponse = new QueryResponseImpl(request);
try {
SourceResponse result = cache.query(request);
queryResponse.setHits(result.getHits());
queryResponse.setProperties(result.getProperties());
queryResponse.addResults(result.getResults(), true);
} catch (UnsupportedQueryException e) {
queryResponse.getProcessingDetails().add(new ProcessingDetailsImpl(getId(), e));
queryResponse.closeResultQueue();
}
return queryResponse;
}
use of ddf.catalog.operation.impl.ProcessingDetailsImpl in project ddf by codice.
the class Search method failSource.
public synchronized void failSource(String sourceId, Exception cause) {
QueryResponseImpl failedResponse = new QueryResponseImpl(null);
failedResponse.closeResultQueue();
failedResponse.setHits(0);
failedResponse.getProcessingDetails().add(new ProcessingDetailsImpl(sourceId, cause));
failedResponse.getProperties().put("elapsed", -1L);
updateStatus(sourceId, failedResponse);
}
use of ddf.catalog.operation.impl.ProcessingDetailsImpl in project ddf by codice.
the class QueryOperations method createUnavailableProcessingDetails.
private ProcessingDetailsImpl createUnavailableProcessingDetails(Source source) {
ProcessingDetailsImpl exception = new ProcessingDetailsImpl();
SourceUnavailableException sue = new SourceUnavailableException("Source \"" + source.getId() + "\" is unavailable and will not be queried");
exception.setException(sue);
exception.setSourceId(source.getId());
if (LOGGER.isDebugEnabled()) {
LOGGER.debug("Source Unavailable", sue);
}
return exception;
}
Aggregations