Commit Graph
32 Commits
Author SHA1 Message Date
Moriarty 13464036a8 Migrate core query tests to JUnit 5 (#3988) 2026-10-09 21:19:23 +00:00
MoriartyandClaude Sonnet 4.6 1cc8844dec Replace deprecated datawave.util.TableName with datawave.table.constants.TableName (#3641)
## Summary

- Replaces all 120 uses of `datawave.util.TableName` (deprecated since
7.40.0, `forRemoval=true`) with the new
`datawave.table.constants.TableName` class in `core/tables`
- Adds an explicit `datawave-core-tables` dependency to
`core/query/pom.xml` — the only affected module that didn't already have
it transitively

## Test plan

- [x] Formatting build passes (`mvn clean install -DskipTests
-DskipITs`)
- [x] Full test suite passes on CI

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Sonnet 4.6 <[email protected]>
2026-06-25 16:16:47 +00:00
Joseph AlphonsoandJoe Alphonso 336293cafc Replace Markings Map with POJO (#3469)
update accumulo-utils to use a POJO for storing markings and then
updated the rest of the codebase that referenced it.
replaced some of the ColumnVisibility usage with AccessExpression to
improve performance.

---------

Co-authored-by: Joe Alphonso <[email protected]>
2026-06-12 15:25:43 -04:00
Joseph Alphonso 63342d4be8 Enhance CompositeQueryLogicResultsIteratorTest with latch (#3475)
Resolves race condition by adding CountDownLatch and removing the fixed
sleep.
Fixing intermittent test failures enables us to run tests faster with
`-T1.0C` more reliably.
2026-03-26 17:38:22 +00:00
Ivan Bella 1fbe1e9dfe Updated DatePartitionedQueryPlanner to succeed as long as one (#3077)
of the date ranges succeeds
2025-10-28 16:28:23 +00:00
FineAndDandy b5994b72ee Feature/remote service timeouts (#3162) 2025-10-07 12:49:28 +00:00
Seth Smuckerandfoster33 be62812a77 Replace Deprecated Calls (#43 from datawave-metadata-utils) (#3026)
Replace deprecated Long(long) with suggested alternative.

part of #2443

---------

Co-authored-by: foster33 <[email protected]>
2025-09-30 15:11:34 +00:00
Drew Farris 09b9db1e77 Adds KeywordUUIDQuery and TagCloudResponse (#2857)
* Adds KeywordUUIDQuery that pairs id lookup with keyword extraction.
  * Creates a chained query logic that first does lookup uuid, followed by document keyword extraction.
  * Adds the ability to generate a word cloud across all keyword results, currently stored in messages portion of the response.
* Adds Datawave TagCloudResponse and supporting classes.
  * Adds two endpoints to /DataWave/Query - /extractKeywords and /generateTagCloud - each take a POST request and return keywords from individual documents or consolidated tag coluds, respectively.
  * Adds response type for /generateTagCloud, the TagCloudResponseBase and accompanying data classes.
  * Updates chained query and improves serialization of objects returned from iterators.
* Addressed formatting, review comments, and completed bugfix.
2025-05-20 21:23:03 +00:00
Christopher GrossandChristopher Gross cogross b51bca0cca fix major issues from sonarqube (#2336)
* fix major issues from sonarqube

* removed unused import

---------

Co-authored-by: Christopher Gross cogross <[email protected]>
2025-04-09 18:13:13 +00:00
6ed6767754 fix build warning messages (#2277)
* fix build warning messages

* remove unused import java.util.Collections

* remove unused import java.util.List

* removed unused imports

* remove unused import

* assertEquals -> assertTrue/False for true/false as appopriate

* fixed ide being helpful and making a * import

* no * imports

* undo tokenization changes. fix tokenization helper import

* GitHub Actions: Fix Formatting

* add missing import

* add Deprecated annotation to match Javadoc

---------

Co-authored-by: Christopher Gross cogross <[email protected]>
Co-authored-by: GitHub Actions <[email protected]>
Co-authored-by: Joe Alphonso <[email protected]>
2025-04-04 17:01:14 +00:00
Christopher GrossandChristopher Gross cogross ba59c38166 fix critical sonarqube issues (#2390)
* fix critical sonarqube issues

* remove unused imports

---------

Co-authored-by: Christopher Gross cogross <[email protected]>
2025-03-31 12:42:30 +00:00
FineAndDandy 5bc65f6e40 Prevent unused imports at compile time (#2769) (#2770)
* Enforce checkstyle at compile time and error on unused import (#2769)

* Remove unused imports (#2769)
2025-02-19 17:18:46 +00:00
FineAndDandyandalerman 863aaa3710 Add DateRangeFilteredQueryLogic (#2665)
* Add DateRangeFilteredQueryLogic

* add DateRangeFilteredQueryLogicTest

* Added javadoc and additional test

* Added junit and DateRangeFilteredQueryLogic.clone()

* formatting fixes

* Extend spotbugs clone() exclusion to datawave.core.query

---------

Co-authored-by: alerman <[email protected]>
2025-02-19 01:17:39 +00:00
FineAndDandy 03eacfff32 Allow configuration of the CompositeQueryLogicResultsIterator poll time (#2764)
* Allow configuration of the CompositeQueryLogicResultsIterator poll time (#2763)

* Add unit tests to verifying poll time impact to results (#2763)
2025-02-14 18:13:49 +00:00
Ivan Bella f9edd06782 Updated the composite query logic to handle the validateQuery mechanism (#2744)
* Updated the composite query logic to handle the validateQuery mechanism
* Updated the filtered query logic and delegating query logic also
2025-02-10 19:31:53 +00:00
97763894a1 Implement query validation endpoint (#2645)
* Implement query validation endpoint

Implement the query/{logicName}/validate endpoint. This feature supports
the ability to configure validation rules that will validate LUCENE and
JEXL queries against a number of criteria and provide meaningful
feedback to customers.

Closes #2585

---------

Co-authored-by: Seth Smucker <[email protected]>
Co-authored-by: Ivan Bella <[email protected]>
2025-01-16 14:00:31 -05:00
emiliodskinnerandGitHub Actions 4ade38a448 task-2619: Update Logging to SLF4j in datawave-core (#2685)
* task-2619: Update Logging to SLF4J in datawave-core

* GitHub Actions: Fix Formatting

* task-2619: Update Logging to SLF4j in datawave-core, fix typos

---------

Co-authored-by: GitHub Actions <[email protected]>
2025-01-16 10:11:07 -05:00
Ivan Bella 1b968ba699 Updated to not copy the query iterator when cloning the query logic as
this can cause execution issues
2024-12-21 01:06:25 +00:00
Ivan Bella 8f81b67072 Ensure we use the same underlying query id for composite queries 2024-10-21 12:05:17 +00:00
Moriarty ead56e3541 Apply Scan Hints to SessionOptions (#2580)
* Initial commit for scan hint overrides for shard index methods

* Update mocks for copy constructor test

* SessionOptions has methods to apply scan hints and scan consistency options, fixed several instances where new session options were created and scan hints were not applied

* Refactor ScannerFactory to support setting execution hints by table name or functional name

* clean up unused variable, import

* add reserved 'expansion' hint key, refactor ScannerFactory.applyConfigs to support falling back to secondary hint key
2024-10-11 08:44:29 -04:00
Ivan Bella cbebe6994e Expose the next response class setter (#2590)
* Expose the next response class setter
* Added a better error message for the composite query logic.
* Added updated starter
2024-10-07 10:13:28 -04:00
Bill Oleyandhgklohr 9435549ce2 Replace NoOpTransformer with CompositeQueryLogicTransformer in CompositeQueryLogic.getTransformIterator() (#2572)
Co-authored-by: hgklohr <[email protected]>
2024-10-04 12:37:31 -04:00
Ivan Bella c41447036d Updated the composite query plan to be parseable as Jexl (#2536)
* Updated the composite query plan to be parseable as Jexl
* Added in the query id for each sub query
2024-09-17 11:01:35 -04:00
04336c42a1 Add FederatedQueryPlanner (#2216)
* Enrich 'i' and 'ri' rows in metadata table with event date

Modify the generation of 'i' (indexed rows) and 'ri' (reverse indexed
rows) in the metadata table such that the column qualifier contains the
event date. This is required as a first step to support efforts for
issue #825 so that we can identify dates when an event was ingested and
included in a frequency count for an associated 'f' row, but was not
indexed.

* Add counts to 'i' and 'ri' rows

* Initial federated query planner implementation

* code formatting

* Fixed issues with FederatedQueryIterable

* Fix test failures

* Fix failing tests

* Additional test fixes

* pr feedback

* Use new MetadataHelper function version

* Extract fields to filter index holes

* Correct logic for determining sub date ranges

* Remove unnecessary check

* code formatting

* Add check for null query model

* Limit config arg to function scope

* Update metadata-utils submodule commit

* code formatting

* Fix failing tests

* Additional test fixes

* Ensure all original tests pass

* Add federated planner tests and chained schedulers

* pr feedback

* metadata-utils 3.0.3 tag

* Fixed the index hole data ingest to set appropriate time stamps on the keys
Removed some of the code which I believe was trying to diagnose the test issues

* Updated applyModel to use the passed in script

* Remove unneeded changes

* Make FederatedQueryPlanner the default

* Restore original log4j.properties

* code formatting

* Fix QueryPlanTest

* Updated to test with teardown

* Test debugging edits

* Updated formatting

* Concatenate sub-plans

* Make FederatedQueryPlanner implement Cloneable

* code formatting

* * Updated with metadata-utils 4.0.5 (index markers and avoid non-indexed fields for holes)
* Fixed test cases with correct responses and periodic failing test cases
* Updated AncestorQueryLogic to handle federate query planner

* * Allow subclasses of ShardQueryConfiguration

* Updated to throw a NoResultsException for am empty query.

* import reorg

* Updated to avoid expanding unfielded if disabled, and to assume no index holes if no query fields.

* Add tests for default query planner with ne and not-eq

* Revert changes to test data format

* Revert changes to log4j.properties

* Ensure query plan updated after any exception type

* Revert all changes to test data format

---------

Co-authored-by: Ivan Bella <[email protected]>
Co-authored-by: hgklohr <[email protected]>
2024-09-09 13:36:33 -04:00
Bill Oleyandhgklohr 2222de6f65 CompositeQueryLogicTransformer must implement WritesQueryMetrics interface, gather stats from delegates (#2479)
* CompositeQueryLogicTransformer must implement WritesQueryMetrics interface, gather stats from delegates

* Code formatting

---------

Co-authored-by: hgklohr <[email protected]>
2024-08-28 17:15:46 -04:00
Whitney O'Meara aa68f70637 Updated GenericQueryConfiguration to save conn pool name (#2495) 2024-08-06 05:51:37 -04:00
Laura Schanno 00cce878ab fixes #2340: Ensure CompositeQueryLogic error codes are sent to metrics (#2399)
The query metrics API expects QueryExceptions to be found in the cause
of the original exception passed to BaseQueryMetric.setError(Throwable).
In the case of CompositeQueryLogic, due to the additional wrapping of
exceptions passed from its defined internal logics in a
CompositeLogicException, query exceptions were not in the expected place
in the stack hierarchy.

Updateid the CompositeLogicException to identify any QueryExceptions
present in the stacks of exception arguments, and ensure that they are
either already a QueryException, or that if they contain a
QueryException in the stack, that they are subsequently wrapped in a
CompositeRaisedQueryException with a copy of the desired error code.
2024-07-03 12:19:42 -04:00
Moriarty 1b605b63a4 Remove deprecated methods in QueryData and QueryPlan (#2448) 2024-06-28 05:38:25 -04:00
d-hwangandMoriarty 10ff2431f0 fixes #2427: nested query logic should make use of systemFrom/dn result limit overrides (#2430)
Co-authored-by: Moriarty <[email protected]>
2024-06-25 09:31:50 -04:00
Moriarty 0f342201b5 Add support for setting scan consistency level on a query logic (#2386)
* Add support for setting scan consistency level on a query logic

Additional updates

Update a few instances that still relied on old constructors

Only update scanner factory hints and consistency if set on logic config

* merge request feedback

* clarify names are per-table
2024-06-12 10:24:19 -04:00
Bill Oley c5a0f3a872 DATAWAVE-1666: Use query-metric-api 4.0.1, use QueryGeometryResponse … (#2402)
* DATAWAVE-1666: Use QueryGeometryResponse from query-metric-api, use redirect for remote query metric GET calls

* Code formatting fixes
2024-06-05 12:58:32 -04:00
9dadf7b2c6 Feature/query microservices (#2192)
* Modified a couple of things and fixed a few tests with the integration merge.

* pulling in latest audit changes

* pulled in latest audit updates

* Fixed metrics version in docker compose

* Updated accumulo utils and datawave starter versions.

* Updated the audit api and audit starter versions

* Updated authorization api version

* Updated accumulo api version.

* Updated config service with latest changes

* updated dictionary and accumulo utils version

* Updated hazelcast version

* bumped query metric api version

* Updated pki for query microservices docker deployment.

* Fixing the docker compose bootstrap to avoid duplicate extra hosts issue.

* adding latest datawave changes

* updated metadata utils

* updated docker compose to use the latest version of each service.

* Added a cached results spring boot starter and updated associated classes accordingly.

* fixing spotbugs error

* fixed install-ingest.sh for datawave.

* Updates to get bulk results map reduce query working again.

* formatting

* Updates per a race condition discovered in the kafka variant of the
query executor tests.

* Update README.md

* accumulo service merge from main

* fixed a test that broke after merging integration

* Added logic from Datawave Principal Login Module to the datawave spring boot starter.

* Updated datawave to 5.4.0-SNAPSHOT

* Updated ProxiedUserDetails to use dynamic type for newInstance method.

* updated audit service to stop intermittent test failures.

* Updated the query results publisher and setup the kafka manager to create topics manually.

* Added github actions for some submodules

* Updated github actions to avoid running out of disk space.

* Updated import sorting for microservices using impsort plugin.

* fixing merge conflicts

* updated metadata utils

* Moved Query, QueryImpl to query-api

* Removed usage of zookeeper stringutils

* added package-info.java for Query, QueryImpl

* updated modification service logic to use ProxiedUserDetails.

* Removed unnecessary jackson annotations to address enunciate issues

* Updated profile ids for submodules

* changes to get the github actions working again

* attempting to fix github actions

* typo

* udpated kafka config

* removed banned dependency

* bumped release version

* formatting

* fixing docker compose kafka setup

* updated deploy poms to work with the latest version of maven

* bumped version for some modules

* bumped microservice service parent version

* Updated with latest changes from main/integration

* fixed the composite query logic for the query microservices

* updated submodules

* Added v1 to the model path

* For this branch we need to checkout all submodules when building tests.

* Added alerman's run cache settings for docker

* Updated github actions to build query microservices correctly

* fixed build cache config typo

* Updated query service to use pool header, and allow for admin override via parameter

* Updated github ci to make sure it runs against the queryMicroservices branch

* Updated lookup uuid to accept multiple terms per field

* Updated confirm ack configuration for query metric service, and added configuration to make rest metrics updates possible

* Added support for long running queries

* Added configcheck command line utility

* updated next call logic for long running queries

* updated query metric service and starter submodules

* Added some plugins to the config check service

* Updated configcheck tests to trim whitespace

* fixing unit tests for config check

* Changed from max long running query timeouts to long running query
timeout

* Updated the query starter submodule

* updated submodules

* fixed composite query logic test

* Refactored query scripts to use common code

* Updated quickstart docker-maven-plugin to not cleanup old tagged releases

* updated common-utils submodule

* Updated LookupService to behave the same as the webservice

* Fixed TypedValue (de)serialization, and added a result post processor to handle things like counts

* reset docker-compose quickstart to just be accumulo, not web

* Changed how the result postprocessor runs to support result aggregation for long running queries

* Renamed aggregateResults to reduceResults

* Added junit-jupiter engine to datawave core pom

* Updated query logic factory to add logic map

* Updated EdgeQueryLogicFactory configuration

* Removed unused RemoteQueryLogic and cleaned up RemoteEventQueryLogic class definition:

* Implemented authorization and query federation for the query microservices

* Fixed copy constructor parameter assignment in QueryData

* Formatting job fix

* Fixing build/formatter issues for latest changes pulled in from integration

* Fixed SSDeepIngestQueryTest

* Updated usage of remote user operations for query microservices

* Fixed QueryPlan constructor

* Moved filtering and delegating query logic functionality into datawave-core-query so it can be used by the microservices

* formatting

* Updated submodules

* Updated package names for commons.lang3 classes due to type-utils fix

* Moved the AuthorizationsPredicate class to authorization-api

* Removed hadoop dependencies from pom

* Updated edge configuration to reset param variables before loading new values

* Excluded log4j from our maven plugins

* Updated in-memory-accumulo javadoc plugin to exclude log4j

* Updated microservice-parent maven-dependency-plugin to exclude log4j

* Removed infinispan from query starter

* Remove validation call from LoadModel

* fixed formatting

* Updated datawave ingest jar libs

* QueryMetricQueryLogic must copy runAsMetricsAdministrator setting in copy constructor

* Revert query metric query logic back to it's original state

* pr feedback

* PR feedback

* PR Feedback

* PR feedback

* PR Feedback

* PR feedback

* PR feedback

* PR Feedback

* PR Feedback

* PR feedback

* PR feedback

* PR feedback

* pr feedback

* PR feedback

* pr feedback

* pr feedback

* pr feedback

* pr feedback

* pr feedback

* pr feedback

* PR feedback

* PR feedback

* pr feedback

* pr feedback

* Updated in-memory-accumulo commit

* in-memory-accumulo

* formatting

* query starter

* pr feedback

* pr feedback

* pr feedback

* pr feedback

* pr feedback

* pr feedback

* pr feedback

* Remoted CachedQueryStatus mechanism

* pr feedback

* pr feedback

* pr feedback

* pr feedback

* pr updates

* pr feedback

* pr review: found duplicate properties between configurations and the
super GenericQueryConfiguration class.  Removed redundant copies in
ShardQueryConfiguration checkpoint copy constructor

* review comments

* review comments

* Reverted path changes in dictionary service

* pr review updates

* updated executor to use QueryStatusUpdateUtil

* updated query microservice submodule

* make github action tests match integration

---------

Co-authored-by: Ivan Bella <[email protected]>
Co-authored-by: GitHub Actions <[email protected]>
Co-authored-by: Bill Oley <[email protected]>
2024-05-20 16:33:34 +00:00