Search in sources :

Example 1 with TokenMgrError

use of org.apache.commons.jexl2.parser.TokenMgrError in project datawave by NationalSecurityAgency.

the class QueryJexl method createNormalizedExpression.

// =================================
// private methods
private Expression createNormalizedExpression(final String query) {
    try {
        ASTJexlScript script = JexlASTHelper.parseJexlQuery(query);
        Deque<SimpleNode> nodes = new LinkedList<>();
        normalizeScript(script, nodes);
        return new NormalizedExpression(jEngine, query, script);
    } catch (TokenMgrError | org.apache.commons.jexl2.parser.ParseException pe) {
        throw new AssertionError(pe);
    }
}
Also used : ASTJexlScript(org.apache.commons.jexl2.parser.ASTJexlScript) TokenMgrError(org.apache.commons.jexl2.parser.TokenMgrError) ParseException(java.text.ParseException) LinkedList(java.util.LinkedList) SimpleNode(org.apache.commons.jexl2.parser.SimpleNode)

Example 2 with TokenMgrError

use of org.apache.commons.jexl2.parser.TokenMgrError in project datawave by NationalSecurityAgency.

the class QueryExecutorBean method planQuery.

/**
 * @param queryLogicName
 * @param queryParameters
 * @return
 */
@POST
@Produces({ "application/xml", "text/xml", "application/json", "text/yaml", "text/x-yaml", "application/x-yaml", "application/x-protobuf", "application/x-protostuff" })
@Path("/{logicName}/plan")
@Interceptors({ RequiredInterceptor.class, ResponseInterceptor.class })
@Timed(name = "dw.query.planQuery", absolute = true)
public GenericResponse<String> planQuery(@Required("logicName") @PathParam("logicName") String queryLogicName, MultivaluedMap<String, String> queryParameters) {
    QueryData qd = validateQuery(queryLogicName, queryParameters, null);
    GenericResponse<String> response = new GenericResponse<>();
    Query q = null;
    Connector connection = null;
    AccumuloConnectionFactory.Priority priority;
    try {
        // Default hasResults to true.
        response.setHasResults(true);
        // by default we will expand the fields but not the values.
        boolean expandFields = true;
        boolean expandValues = false;
        if (queryParameters.containsKey(EXPAND_FIELDS)) {
            expandFields = Boolean.valueOf(queryParameters.getFirst(EXPAND_FIELDS));
        }
        if (queryParameters.containsKey(EXPAND_VALUES)) {
            expandValues = Boolean.valueOf(queryParameters.getFirst(EXPAND_VALUES));
        }
        AuditType auditType = qd.logic.getAuditType(null);
        try {
            MultivaluedMap<String, String> optionalQueryParameters = new MultivaluedMapImpl<>();
            optionalQueryParameters.putAll(qp.getUnknownParameters(queryParameters));
            q = persister.create(qd.userDn, qd.dnList, marking, queryLogicName, qp, optionalQueryParameters);
            auditType = qd.logic.getAuditType(q);
        } finally {
            queryParameters.add(PrivateAuditConstants.AUDIT_TYPE, auditType.name());
            // on audit if needed, and we are using the index to expand the values
            if (expandValues && !auditType.equals(AuditType.NONE)) {
                // audit the query before its executed.
                try {
                    try {
                        List<String> selectors = qd.logic.getSelectors(q);
                        if (selectors != null && !selectors.isEmpty()) {
                            queryParameters.put(PrivateAuditConstants.SELECTORS, selectors);
                        }
                    } catch (Exception e) {
                        log.error("Error accessing query selector", e);
                    }
                    // if the user didn't set an audit id, use the query id
                    if (!queryParameters.containsKey(AuditParameters.AUDIT_ID)) {
                        queryParameters.putSingle(AuditParameters.AUDIT_ID, q.getId().toString());
                    }
                    auditor.audit(queryParameters);
                } catch (IllegalArgumentException e) {
                    log.error("Error validating audit parameters", e);
                    BadRequestQueryException qe = new BadRequestQueryException(DatawaveErrorCode.MISSING_REQUIRED_PARAMETER, e);
                    response.addException(qe);
                    throw new BadRequestException(qe, response);
                } catch (Exception e) {
                    log.error("Error auditing query", e);
                    QueryException qe = new QueryException(DatawaveErrorCode.QUERY_AUDITING_ERROR, e);
                    response.addException(qe);
                    throw qe;
                }
            }
        }
        priority = qd.logic.getConnectionPriority();
        Map<String, String> trackingMap = connectionFactory.getTrackingMap(Thread.currentThread().getStackTrace());
        addQueryToTrackingMap(trackingMap, q);
        accumuloConnectionRequestBean.requestBegin(q.getId().toString());
        try {
            connection = connectionFactory.getConnection(qd.logic.getConnPoolName(), priority, trackingMap);
        } finally {
            accumuloConnectionRequestBean.requestEnd(q.getId().toString());
        }
        Set<Authorizations> calculatedAuths = AuthorizationsUtil.getDowngradedAuthorizations(qp.getAuths(), qd.p);
        String plan = qd.logic.getPlan(connection, q, calculatedAuths, expandFields, expandValues);
        response.setResult(plan);
        return response;
    } catch (Throwable t) {
        response.setHasResults(false);
        /*
             * Allow web services to throw their own WebApplicationExceptions
             */
        if (t instanceof Error && !(t instanceof TokenMgrError)) {
            log.error(t.getMessage(), t);
            throw (Error) t;
        } else if (t instanceof WebApplicationException) {
            log.error(t.getMessage(), t);
            throw ((WebApplicationException) t);
        } else {
            log.error(t.getMessage(), t);
            QueryException qe = new QueryException(DatawaveErrorCode.QUERY_PLAN_ERROR, t);
            response.addException(qe.getBottomQueryException());
            int statusCode = qe.getBottomQueryException().getStatusCode();
            throw new DatawaveWebApplicationException(qe, response, statusCode);
        }
    } finally {
        if (connection != null) {
            try {
                connectionFactory.returnConnection(connection);
            } catch (Exception e) {
                log.error("Failed to close connection for " + q.getId(), e);
            }
        }
        // close the logic on exception
        try {
            if (null != qd.logic) {
                qd.logic.close();
            }
        } catch (Exception e) {
            log.error("Exception occured while closing query logic; may be innocuous if scanners were running.", e);
        }
        if (null != connection) {
            try {
                connectionFactory.returnConnection(connection);
            } catch (Exception e) {
                log.error("Error returning connection on failed create", e);
            }
        }
    }
}
Also used : Connector(org.apache.accumulo.core.client.Connector) Query(datawave.webservice.query.Query) DatawaveWebApplicationException(datawave.webservice.common.exception.DatawaveWebApplicationException) WebApplicationException(javax.ws.rs.WebApplicationException) AccumuloConnectionFactory(datawave.webservice.common.connection.AccumuloConnectionFactory) DatawaveWebApplicationException(datawave.webservice.common.exception.DatawaveWebApplicationException) Authorizations(org.apache.accumulo.core.security.Authorizations) GenericResponse(datawave.webservice.result.GenericResponse) AuditType(datawave.webservice.common.audit.Auditor.AuditType) BadRequestQueryException(datawave.webservice.query.exception.BadRequestQueryException) TokenMgrError(org.apache.commons.jexl2.parser.TokenMgrError) MultivaluedMapImpl(org.jboss.resteasy.specimpl.MultivaluedMapImpl) TokenMgrError(org.apache.commons.jexl2.parser.TokenMgrError) DatawaveWebApplicationException(datawave.webservice.common.exception.DatawaveWebApplicationException) CancellationException(java.util.concurrent.CancellationException) PreConditionFailedQueryException(datawave.webservice.query.exception.PreConditionFailedQueryException) WebApplicationException(javax.ws.rs.WebApplicationException) HeuristicMixedException(javax.transaction.HeuristicMixedException) NotFoundQueryException(datawave.webservice.query.exception.NotFoundQueryException) NoResultsQueryException(datawave.webservice.query.exception.NoResultsQueryException) IOException(java.io.IOException) QueryException(datawave.webservice.query.exception.QueryException) BadRequestException(datawave.webservice.common.exception.BadRequestException) HeuristicRollbackException(javax.transaction.HeuristicRollbackException) UnauthorizedQueryException(datawave.webservice.query.exception.UnauthorizedQueryException) JAXBException(javax.xml.bind.JAXBException) UnauthorizedException(datawave.webservice.common.exception.UnauthorizedException) NoResultsException(datawave.webservice.common.exception.NoResultsException) RejectedExecutionException(java.util.concurrent.RejectedExecutionException) RollbackException(javax.transaction.RollbackException) BadRequestQueryException(datawave.webservice.query.exception.BadRequestQueryException) PreConditionFailedQueryException(datawave.webservice.query.exception.PreConditionFailedQueryException) NotFoundQueryException(datawave.webservice.query.exception.NotFoundQueryException) NoResultsQueryException(datawave.webservice.query.exception.NoResultsQueryException) QueryException(datawave.webservice.query.exception.QueryException) UnauthorizedQueryException(datawave.webservice.query.exception.UnauthorizedQueryException) BadRequestQueryException(datawave.webservice.query.exception.BadRequestQueryException) BadRequestException(datawave.webservice.common.exception.BadRequestException) Path(javax.ws.rs.Path) Interceptors(javax.interceptor.Interceptors) POST(javax.ws.rs.POST) Produces(javax.ws.rs.Produces) Timed(com.codahale.metrics.annotation.Timed)

Example 3 with TokenMgrError

use of org.apache.commons.jexl2.parser.TokenMgrError in project datawave by NationalSecurityAgency.

the class QueryExecutorBean method createQuery.

/**
 * @param queryLogicName
 * @param queryParameters
 * @return
 */
@POST
@Produces({ "application/xml", "text/xml", "application/json", "text/yaml", "text/x-yaml", "application/x-yaml", "application/x-protobuf", "application/x-protostuff" })
@Path("/{logicName}/create")
@GZIP
@GenerateQuerySessionId(cookieBasePath = "/DataWave/Query/")
@EnrichQueryMetrics(methodType = MethodType.CREATE)
@Interceptors({ RequiredInterceptor.class, ResponseInterceptor.class })
@Timed(name = "dw.query.createQuery", absolute = true)
public GenericResponse<String> createQuery(@Required("logicName") @PathParam("logicName") String queryLogicName, MultivaluedMap<String, String> queryParameters, @Context HttpHeaders httpHeaders) {
    CreateQuerySessionIDFilter.QUERY_ID.set(null);
    QueryData qd = validateQuery(queryLogicName, queryParameters, httpHeaders);
    GenericResponse<String> response = new GenericResponse<>();
    Query q = null;
    Connector connection = null;
    AccumuloConnectionFactory.Priority priority;
    Span createSpan = null;
    RunningQuery rq = null;
    try {
        // Default hasResults to true. If a query logic is actually able to set this value,
        // then their value will overwrite this one. Otherwise, we return true so that
        // callers know they have to call next (even though next may not return results).
        response.setHasResults(true);
        AuditType auditType = qd.logic.getAuditType(null);
        try {
            MultivaluedMap<String, String> optionalQueryParameters = new MultivaluedMapImpl<>();
            optionalQueryParameters.putAll(qp.getUnknownParameters(queryParameters));
            q = persister.create(qd.userDn, qd.dnList, marking, queryLogicName, qp, optionalQueryParameters);
            auditType = qd.logic.getAuditType(q);
        } finally {
            queryParameters.add(PrivateAuditConstants.AUDIT_TYPE, auditType.name());
            if (!auditType.equals(AuditType.NONE)) {
                // audit the query before its executed.
                try {
                    try {
                        List<String> selectors = qd.logic.getSelectors(q);
                        if (selectors != null && !selectors.isEmpty()) {
                            queryParameters.put(PrivateAuditConstants.SELECTORS, selectors);
                        }
                    } catch (Exception e) {
                        log.error("Error accessing query selector", e);
                    }
                    // if the user didn't set an audit id, use the query id
                    if (!queryParameters.containsKey(AuditParameters.AUDIT_ID)) {
                        queryParameters.putSingle(AuditParameters.AUDIT_ID, q.getId().toString());
                    }
                    auditor.audit(queryParameters);
                } catch (IllegalArgumentException e) {
                    log.error("Error validating audit parameters", e);
                    BadRequestQueryException qe = new BadRequestQueryException(DatawaveErrorCode.MISSING_REQUIRED_PARAMETER, e);
                    response.addException(qe);
                    throw new BadRequestException(qe, response);
                } catch (Exception e) {
                    log.error("Error auditing query", e);
                    QueryException qe = new QueryException(DatawaveErrorCode.QUERY_AUDITING_ERROR, e);
                    response.addException(qe);
                    throw qe;
                }
            }
        }
        priority = qd.logic.getConnectionPriority();
        Map<String, String> trackingMap = connectionFactory.getTrackingMap(Thread.currentThread().getStackTrace());
        addQueryToTrackingMap(trackingMap, q);
        accumuloConnectionRequestBean.requestBegin(q.getId().toString());
        try {
            connection = connectionFactory.getConnection(qd.logic.getConnPoolName(), priority, trackingMap);
        } finally {
            accumuloConnectionRequestBean.requestEnd(q.getId().toString());
        }
        // If we're supposed to trace this query, then turn tracing on and set information about the query
        // onto the span so that it is saved in the trace table.
        TInfo traceInfo = null;
        boolean shouldTraceQuery = shouldTraceQuery(qp.getQuery(), qd.userid, qp.isTrace());
        if (shouldTraceQuery) {
            Span span = Trace.on("query:" + q.getId());
            log.debug("Tracing query " + q.getId() + " [" + qp.getQuery() + "] on trace ID " + Long.toHexString(span.traceId()));
            for (Entry<String, List<String>> param : queryParameters.entrySet()) {
                span.data(param.getKey(), param.getValue().get(0));
            }
            traceInfo = Tracer.traceInfo();
            createSpan = Trace.start("query:create");
        }
        // hold on to a reference of the query logic so we cancel it if need be.
        qlCache.add(q.getId().toString(), qd.userid, qd.logic, connection);
        rq = new RunningQuery(metrics, null, priority, qd.logic, q, qp.getAuths(), qd.p, new RunningQueryTimingImpl(queryExpirationConf, qp.getPageTimeout()), this.executor, this.predictor, this.metricFactory);
        rq.setActiveCall(true);
        rq.setTraceInfo(traceInfo);
        rq.getMetric().setProxyServers(qd.proxyServers);
        rq.setConnection(connection);
        // Put in the cache by id. Don't put the cache in by name because multiple users may use the same name
        // and only the last one will be in the cache.
        queryCache.put(q.getId().toString(), rq);
        response.setResult(q.getId().toString());
        rq.setActiveCall(false);
        CreateQuerySessionIDFilter.QUERY_ID.set(q.getId().toString());
        return response;
    } catch (Throwable t) {
        response.setHasResults(false);
        if (rq != null) {
            rq.getMetric().setError(t);
        }
        // close the logic on exception
        try {
            if (null != qd.logic) {
                qd.logic.close();
            }
        } catch (Exception e) {
            log.error("Exception occured while closing query logic; may be innocuous if scanners were running.", e);
        }
        if (null != connection) {
            try {
                connectionFactory.returnConnection(connection);
            } catch (Exception e) {
                log.error("Error returning connection on failed create", e);
            }
        }
        try {
            if (null != q)
                persister.remove(q);
        } catch (Exception e) {
            response.addException(new QueryException(DatawaveErrorCode.DEPERSIST_ERROR, e).getBottomQueryException());
        }
        /*
             * Allow web services to throw their own WebApplicationExceptions
             */
        if (t instanceof Error && !(t instanceof TokenMgrError)) {
            log.error(t.getMessage(), t);
            throw (Error) t;
        } else if (t instanceof WebApplicationException) {
            log.error(t.getMessage(), t);
            throw ((WebApplicationException) t);
        } else if (t instanceof InterruptedException) {
            if (rq != null) {
                rq.getMetric().setLifecycle(QueryMetric.Lifecycle.CANCELLED);
            }
            log.info("Query " + q.getId() + " canceled on request");
            QueryException qe = new QueryException(DatawaveErrorCode.QUERY_CANCELED, t);
            response.addException(qe.getBottomQueryException());
            int statusCode = qe.getBottomQueryException().getStatusCode();
            throw new DatawaveWebApplicationException(qe, response, statusCode);
        } else {
            log.error(t.getMessage(), t);
            QueryException qe = new QueryException(DatawaveErrorCode.RUNNING_QUERY_CACHE_ERROR, t);
            response.addException(qe.getBottomQueryException());
            int statusCode = qe.getBottomQueryException().getStatusCode();
            throw new DatawaveWebApplicationException(qe, response, statusCode);
        }
    } finally {
        if (createSpan != null) {
            createSpan.stop();
        // TODO: not sure this makes any sense anymore in Accumulo 1.8.1
        // Stop the main query span since we're done working with it on this thread.
        // We'll continue it later.
        // createSpan.parent().stop();
        }
        if (null != q) {
            // - Remove the logic from the cache
            qlCache.poll(q.getId().toString());
        }
    }
}
Also used : Connector(org.apache.accumulo.core.client.Connector) Query(datawave.webservice.query.Query) DatawaveWebApplicationException(datawave.webservice.common.exception.DatawaveWebApplicationException) WebApplicationException(javax.ws.rs.WebApplicationException) Span(org.apache.accumulo.core.trace.Span) AccumuloConnectionFactory(datawave.webservice.common.connection.AccumuloConnectionFactory) DatawaveWebApplicationException(datawave.webservice.common.exception.DatawaveWebApplicationException) ArrayList(java.util.ArrayList) List(java.util.List) TInfo(org.apache.accumulo.core.trace.thrift.TInfo) GenericResponse(datawave.webservice.result.GenericResponse) AuditType(datawave.webservice.common.audit.Auditor.AuditType) BadRequestQueryException(datawave.webservice.query.exception.BadRequestQueryException) TokenMgrError(org.apache.commons.jexl2.parser.TokenMgrError) MultivaluedMapImpl(org.jboss.resteasy.specimpl.MultivaluedMapImpl) TokenMgrError(org.apache.commons.jexl2.parser.TokenMgrError) DatawaveWebApplicationException(datawave.webservice.common.exception.DatawaveWebApplicationException) CancellationException(java.util.concurrent.CancellationException) PreConditionFailedQueryException(datawave.webservice.query.exception.PreConditionFailedQueryException) WebApplicationException(javax.ws.rs.WebApplicationException) HeuristicMixedException(javax.transaction.HeuristicMixedException) NotFoundQueryException(datawave.webservice.query.exception.NotFoundQueryException) NoResultsQueryException(datawave.webservice.query.exception.NoResultsQueryException) IOException(java.io.IOException) QueryException(datawave.webservice.query.exception.QueryException) BadRequestException(datawave.webservice.common.exception.BadRequestException) HeuristicRollbackException(javax.transaction.HeuristicRollbackException) UnauthorizedQueryException(datawave.webservice.query.exception.UnauthorizedQueryException) JAXBException(javax.xml.bind.JAXBException) UnauthorizedException(datawave.webservice.common.exception.UnauthorizedException) NoResultsException(datawave.webservice.common.exception.NoResultsException) RejectedExecutionException(java.util.concurrent.RejectedExecutionException) RollbackException(javax.transaction.RollbackException) BadRequestQueryException(datawave.webservice.query.exception.BadRequestQueryException) PreConditionFailedQueryException(datawave.webservice.query.exception.PreConditionFailedQueryException) NotFoundQueryException(datawave.webservice.query.exception.NotFoundQueryException) NoResultsQueryException(datawave.webservice.query.exception.NoResultsQueryException) QueryException(datawave.webservice.query.exception.QueryException) UnauthorizedQueryException(datawave.webservice.query.exception.UnauthorizedQueryException) BadRequestQueryException(datawave.webservice.query.exception.BadRequestQueryException) BadRequestException(datawave.webservice.common.exception.BadRequestException) RunningQueryTimingImpl(datawave.webservice.query.cache.RunningQueryTimingImpl) Path(javax.ws.rs.Path) GenerateQuerySessionId(datawave.annotation.GenerateQuerySessionId) Interceptors(javax.interceptor.Interceptors) POST(javax.ws.rs.POST) Produces(javax.ws.rs.Produces) Timed(com.codahale.metrics.annotation.Timed) GZIP(org.jboss.resteasy.annotations.GZIP) EnrichQueryMetrics(datawave.webservice.query.annotation.EnrichQueryMetrics)

Example 4 with TokenMgrError

use of org.apache.commons.jexl2.parser.TokenMgrError in project datawave by NationalSecurityAgency.

the class JexlASTHelper method parseJexlQuery.

/**
 * Parse a query string using a JEXL parser and transform it into a parse tree of our RefactoredDatawaveTreeNodes. This also sets all convenience maps that
 * the analyzer provides.
 *
 * @param query
 *            The query string in JEXL syntax to parse
 * @return Root node of the query parse tree.
 * @throws ParseException
 */
public static ASTJexlScript parseJexlQuery(String query) throws ParseException {
    // Instantiate a parser and visitor
    Parser parser = new Parser(new StringReader(";"));
    // lowercase all 'and', 'or', and 'not' portions of the query.
    String caseFixQuery = AND_PATTERN.matcher(query).replaceAll(" and ");
    caseFixQuery = OR_PATTERN.matcher(caseFixQuery).replaceAll(" or ");
    caseFixQuery = NOT_PATTERN.matcher(caseFixQuery).replaceAll(" not ");
    if (caseFixQuery.contains(DOUBLE_BACKSLASH)) {
        try {
            return parseQueryWithBackslashes(query, parser);
        } catch (Exception e) {
            throw new ParseException("Unable to perform backslash substitution while parsing the query: " + e.getMessage());
        }
    } else {
        // Parse the original query
        try {
            return parser.parse(new StringReader(caseFixQuery), null);
        } catch (TokenMgrError e) {
            throw new ParseException(e.getMessage());
        }
    }
}
Also used : StringReader(java.io.StringReader) TokenMgrError(org.apache.commons.jexl2.parser.TokenMgrError) ParseException(org.apache.commons.jexl2.parser.ParseException) TableNotFoundException(org.apache.accumulo.core.client.TableNotFoundException) NormalizationException(datawave.data.normalizer.NormalizationException) DatawaveFatalQueryException(datawave.query.exceptions.DatawaveFatalQueryException) NotFoundQueryException(datawave.webservice.query.exception.NotFoundQueryException) ParseException(org.apache.commons.jexl2.parser.ParseException) NoSuchElementException(java.util.NoSuchElementException) QueryException(datawave.webservice.query.exception.QueryException) Parser(org.apache.commons.jexl2.parser.Parser)

Example 5 with TokenMgrError

use of org.apache.commons.jexl2.parser.TokenMgrError in project datawave by NationalSecurityAgency.

the class EdgeQueryLogic method configureRanges.

/**
 * Parses JEXL in query string to create ranges and column family filters
 *
 * @param queryString
 *            jexl string for the query
 */
protected QueryData configureRanges(String queryString) throws ParseException {
    queryString = EdgeQueryLogic.fixQueryString(queryString);
    QueryData qData = new QueryData();
    Parser parser = new Parser(new StringReader(";"));
    ASTJexlScript script;
    try {
        script = parser.parse(new StringReader(queryString), null);
    } catch (TokenMgrError | Exception e) {
        throw new IllegalArgumentException("Invalid jexl supplied. " + e.getMessage());
    }
    script = TreeFlatteningRebuildingVisitor.flatten(script);
    EdgeTableRangeBuildingVisitor visitor = new EdgeTableRangeBuildingVisitor(config.includeStats(), dataTypes, config.getMaxQueryTerms(), regexDataTypes);
    visitationContext = (VisitationContext) script.jjtAccept(visitor, null);
    Set<Range> ranges = visitationContext.getRanges();
    qData.setRanges(ranges);
    return qData;
}
Also used : QueryData(datawave.webservice.query.configuration.QueryData) ASTJexlScript(org.apache.commons.jexl2.parser.ASTJexlScript) StringReader(java.io.StringReader) TokenMgrError(org.apache.commons.jexl2.parser.TokenMgrError) EdgeTableRangeBuildingVisitor(datawave.query.jexl.visitors.EdgeTableRangeBuildingVisitor) Range(org.apache.accumulo.core.data.Range) TableNotFoundException(org.apache.accumulo.core.client.TableNotFoundException) DatawaveFatalQueryException(datawave.query.exceptions.DatawaveFatalQueryException) ParseException(org.apache.commons.jexl2.parser.ParseException) JexlException(org.apache.commons.jexl2.JexlException) IOException(java.io.IOException) Parser(org.apache.commons.jexl2.parser.Parser)

Aggregations

TokenMgrError (org.apache.commons.jexl2.parser.TokenMgrError)8 NotFoundQueryException (datawave.webservice.query.exception.NotFoundQueryException)5 QueryException (datawave.webservice.query.exception.QueryException)5 DatawaveWebApplicationException (datawave.webservice.common.exception.DatawaveWebApplicationException)4 Query (datawave.webservice.query.Query)4 BadRequestQueryException (datawave.webservice.query.exception.BadRequestQueryException)4 NoResultsQueryException (datawave.webservice.query.exception.NoResultsQueryException)4 PreConditionFailedQueryException (datawave.webservice.query.exception.PreConditionFailedQueryException)4 UnauthorizedQueryException (datawave.webservice.query.exception.UnauthorizedQueryException)4 GenericResponse (datawave.webservice.result.GenericResponse)4 IOException (java.io.IOException)4 MultivaluedMapImpl (org.jboss.resteasy.specimpl.MultivaluedMapImpl)4 Timed (com.codahale.metrics.annotation.Timed)3 AuditType (datawave.webservice.common.audit.Auditor.AuditType)3 AccumuloConnectionFactory (datawave.webservice.common.connection.AccumuloConnectionFactory)3 NoResultsException (datawave.webservice.common.exception.NoResultsException)3 UnauthorizedException (datawave.webservice.common.exception.UnauthorizedException)3 StringReader (java.io.StringReader)3 BaseQueryMetric (datawave.microservice.querymetric.BaseQueryMetric)2 DatawaveFatalQueryException (datawave.query.exceptions.DatawaveFatalQueryException)2