Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/query microservices #3

Merged
merged 219 commits into from
May 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
219 commits
Select commit Hold shift + click to select a range
a8b8558
DATAWAVE query microservices initial commit.
jwomeara Jan 12, 2021
3c27c62
WIP: Added a readme and laid the groundwork for the microservice.
jwomeara Jan 14, 2021
e348e35
WIP: Readme formatting
jwomeara Jan 14, 2021
31d9724
More query storage
ivakegg Jan 20, 2021
fce3a0c
WIP: Working through translation of existing method annotations to sp…
jwomeara Jan 19, 2021
fdba617
formatting
ivakegg Jan 20, 2021
5519673
Making progress on rest controller annotation translation.
jwomeara Jan 22, 2021
3bdcdaf
Working on a query service test to verify functionality.
jwomeara Jan 25, 2021
fff2c49
Created QuerySessionIdFilter which can be used to configure cookies.
jwomeara Jan 27, 2021
88dd651
got tests running for the storage service
jwomeara Jan 29, 2021
d90e120
Downgraded to previous spring boot version to fix junit build issues.
jwomeara Jan 29, 2021
09a781f
Added logic for setting query header fields for base query responses.
jwomeara Feb 8, 2021
6bf89ea
formatting
jwomeara Feb 8, 2021
0f250cf
WIP: making progress on rest controller request stats interface.
jwomeara Feb 14, 2021
46654d2
Added stats filter/interceptors which will be used to update datawave…
jwomeara Feb 18, 2021
8dd5131
added initial docker compose with sample configs and reconfigured que…
jwomeara Mar 2, 2021
19c6caa
Added sample configs for the query and query-storage microservices.
jwomeara Mar 2, 2021
10f15b4
Fixed the query service test error, and removed unnecessary test certs.
jwomeara Mar 5, 2021
88fd2e5
Fixed a bug where the query storage cache would complain about multip…
jwomeara Mar 5, 2021
980c3c3
wip
jwomeara Mar 10, 2021
3774b11
Working on pulling query logic classes into a separate module.
jwomeara Mar 19, 2021
eeefb2d
missing property for query locking manager
ivakegg Mar 31, 2021
39f3cf0
Updated to spring-boot 2.4 dependencies
ivakegg Apr 2, 2021
e9ceb58
Made some updates for spring boot 2.4.4
jwomeara Apr 9, 2021
89d7e21
Merge branch 'release/version3.2' into feature/queryMicroservices
ivakegg Apr 14, 2021
34addec
Changed the the iterators to return Result objects instead of Entry<K…
ivakegg Apr 14, 2021
54046af
Updated spring boot dependencies to 2.4.4
jwomeara Apr 16, 2021
9ab7332
Made a little more headway into determining when a range's results ha…
ivakegg Apr 16, 2021
bdfa8db
Added the ability to load the default QueryLogicFactory.xml or setup …
jwomeara Apr 16, 2021
2e2640f
Fix versions to work with the 3.2 merge
ivakegg Apr 21, 2021
4fa0219
Got the query checkpoint and restart working.
ivakegg Apr 21, 2021
56752db
WIP: Working on enabling QueryLogicFactory configuration via spring p…
jwomeara Apr 23, 2021
cb774a0
WIP: Trying to get QueryLogicFactory configured and working correctly…
jwomeara Apr 26, 2021
0bb2de0
WIP: Got QueryLogicFactory working in the spring boot datawave query …
jwomeara Apr 28, 2021
c4220f2
Got the define call working for the query service.
jwomeara Apr 28, 2021
cff323a
Fixed a javax validation api issue and starter pulling classes out of…
jwomeara Apr 30, 2021
9f3fb7b
lock stuff
jwomeara May 5, 2021
542e317
added lock implementation to lockmanager
jwomeara May 5, 2021
7f29ca1
Created a Hazelcast implementation of the Query Lock Manager.
ivakegg May 5, 2021
476e776
minor fixes
jwomeara May 6, 2021
38437e9
Trying to flesh out the next call...
jwomeara May 6, 2021
4f4ac65
Added query service event handler and continued to work on next, clos…
jwomeara May 12, 2021
f20408a
Created a QueryStorageLock object to encapsolate the locking methods.
ivakegg May 12, 2021
6764867
Removed the query lock manager since we now have locking coupled with…
ivakegg May 14, 2021
ca37f1e
Added the query cache to the query starter. Created an initial direc…
ivakegg May 14, 2021
f338d8a
Updated to pass the principals authorizations via the QueryStatus. S…
ivakegg May 14, 2021
94fe563
Updated query storage cache to use stop creating it's own hazelcast i…
jwomeara May 15, 2021
3dc1b0f
Various updates:
jwomeara May 18, 2021
3dd0a19
Reworked some of the conditional annotations for query storage, and u…
jwomeara May 19, 2021
a6f5ac0
Added separate create and define query calls for the query storage ca…
jwomeara May 19, 2021
6f64685
Kafka and RabbitMq working with query storage cache test. Changed re…
ivakegg May 21, 2021
7995ade
formatting
ivakegg May 21, 2021
35dc981
Added dev-messaging docker-compose configuration.
jwomeara May 21, 2021
3f30b35
Implemented the query next call.
jwomeara May 27, 2021
73db631
Updated next call to use a builder, and to control cache hit rate via…
jwomeara May 28, 2021
ccdf63c
Stubbed out some query monitoring logic which can be used to periodic…
jwomeara May 29, 2021
e60e87d
Fleshed out the query monitoring logic and added additional query req…
jwomeara Jun 3, 2021
5d8f3ee
formatting
jwomeara Jun 3, 2021
4d42313
Added a QueryStatus Update Helper which automatically handles locking…
jwomeara Jun 4, 2021
27a6000
Updated query monitoring to use the user's page timeout, and added pa…
jwomeara Jun 4, 2021
0b8ba9c
added createAndNext call to the query service controller.
jwomeara Jun 4, 2021
6ae8b6b
Added listQueryLogic, adminClose, and adminCancel to the query servic…
jwomeara Jun 4, 2021
8f97ca1
Added reset and remove calls to the query service controller. Added …
jwomeara Jun 7, 2021
c237586
added an update query method to the query service controller and remo…
jwomeara Jun 9, 2021
b5d910e
Revised the reset logic to cancel the existing query and create a new…
jwomeara Jun 9, 2021
df83190
formatting
jwomeara Jun 9, 2021
c522f76
Added an implementation for multiple query service controller methods…
jwomeara Jun 10, 2021
fc36094
Added logging for admin user actions in the query controller.
jwomeara Jun 10, 2021
ef3ae6b
Refactored the query storage to be in the query starter instead
ivakegg Jun 11, 2021
7438dba
Removed the TaskNotification in lieu of the QueryRequest. Changed qu…
ivakegg Jun 11, 2021
2b17545
Added javadoc for the query management service.
jwomeara Jun 14, 2021
626b3a9
Adjusted dependencies to get embedded kafka tests working again.
jwomeara Jun 14, 2021
155e089
Added query service tests for define and create
jwomeara Jun 17, 2021
54e956f
Updated next call logic to be able to determine when all results have…
jwomeara Jun 17, 2021
bc4b388
Working on testing the next call for the query service.
jwomeara Jun 17, 2021
7a3583c
Updated to encorporate consumer acknowledgements for the results
ivakegg Jun 25, 2021
be84624
Updated to generate results if numConcurrentNextCalls>0 when a query …
ivakegg Jun 25, 2021
ef1a7ff
Resolved missing class errors when running query next test.
jwomeara Jul 15, 2021
2ad4b96
Added success and failure tests for the query service next call.
jwomeara Jul 22, 2021
70f7a2f
Added query service tests for next, cancel, close, and reset.
jwomeara Jul 30, 2021
bf2ff0e
Added additional query service tests.
jwomeara Jul 31, 2021
0390a8d
Incorporated the new query metrics api into the query service.
jwomeara Aug 6, 2021
99128ce
Disabled the query metrics client for tests which don't run as web ap…
jwomeara Aug 6, 2021
8f10a8e
Updated result object to hold only one underlying result.
ivakegg Aug 12, 2021
9b2cf86
Updated the query starter to include a default QueryLogicFactory.xml,…
jwomeara Aug 19, 2021
3d1980e
Updated request filters to to use request scoped beans.
jwomeara Aug 19, 2021
3b7c44e
Updated the query service to correctly populate query metrics.
jwomeara Aug 19, 2021
13a695a
Updated logging for the query service to be more useful.
jwomeara Sep 1, 2021
55f1a13
Fixed service to service communication via spring cloud bus.
jwomeara Sep 7, 2021
4f5a0e5
Updated query service to log audit messages before sending.
jwomeara Sep 10, 2021
f2dde7d
Fixed the test configurations
ivakegg Sep 10, 2021
1eda4d5
Updated the query service to wait for a create event from the executo…
jwomeara Sep 13, 2021
f73833c
Updated the extracted modules to produce jboss-compatible jars. Got …
jwomeara Sep 14, 2021
c3e183e
Refactored the common, query, and connection-pool modules into a sepa…
jwomeara Sep 17, 2021
9fff918
Created datawave-services-common-util to contain the classes from dat…
jwomeara Sep 20, 2021
21a1a16
Moved the remote dictionary services out of datawave-query-core.
jwomeara Sep 22, 2021
d185687
Updated to store the originService in the QueryStatus cache for use b…
ivakegg Sep 22, 2021
84103af
Added eror code into the query status, and added looking for a failed…
ivakegg Sep 29, 2021
1816ecd
Merge branch 'integration' into feature/queryMicroservices
ivakegg Oct 27, 2021
0fb6bf5
Updated query checkpoints to store the query configuration. Updated …
jwomeara Oct 28, 2021
edc398f
Updated ingest config to use correct date for tvmaze data. Fixed an …
jwomeara Oct 29, 2021
501240f
Renamed some of the executor classes to be more understandable.
ivakegg Nov 3, 2021
526b52b
Revert next call to not check the listener after stopping it.
ivakegg Nov 3, 2021
4249601
Added a latch mechanism to acknowledge results correctly.
ivakegg Nov 5, 2021
3c4c2e0
Updated executor to indicate when all tasks are generated, and to dis…
jwomeara Nov 11, 2021
74d29d7
Fixed a bug introduced by the last change which caused multiple execu…
jwomeara Nov 12, 2021
327c0af
Reworked some of the messaging logic in order to ensure that the corr…
jwomeara Nov 19, 2021
3c8a3c8
Added plan and predict rest endpoints to the query service. Plan is …
jwomeara Nov 22, 2021
9760084
Got the DiscoveryQuery working as checkpointable and noncheckpointable.
ivakegg Nov 19, 2021
86d5c2b
Added a hazelcast query results manager. Added a hazelcast claim che…
jwomeara Nov 24, 2021
c96079f
Added rest endpoints to retrieve the plan and predictions.
jwomeara Nov 26, 2021
e915fdc
Added initial lookupUUID & batchLookupUUID functionality to the query…
jwomeara Dec 12, 2021
c4d9045
Got content lookups working. Updated base64 decoding logic to avoid …
jwomeara Dec 17, 2021
d8c3892
Removed placeholder predict response.
jwomeara Dec 17, 2021
f8def37
Added tests for LookupService
jwomeara Dec 29, 2021
e164700
Updated the edge xmlBeansPath to pull from a unique property instead …
jwomeara Dec 29, 2021
43c3e97
Added a streaming service which can be used to stream query results.
jwomeara Jan 7, 2022
3ac3d04
Added javadoc and removed unnecessary parameters for streaming service.
jwomeara Jan 7, 2022
ae64095
Added a streaming query test.
jwomeara Jan 14, 2022
45a78c7
Updated guava to the latest version across the board to fix a hazelca…
jwomeara Jan 20, 2022
22c298a
Updated lookup service to be able to stream results.
jwomeara Jan 14, 2022
6f174bf
Updated lookup to pass the right parameters when running a streaming …
jwomeara Jan 21, 2022
d0602f7
Updated the query management service to periodically check for execut…
jwomeara Jan 25, 2022
51bfa41
Updated datawave microservice parent version to 1.9-SNAPSHOT. Update…
jwomeara Jan 27, 2022
75b4955
Updates for spring boot 2.6.3
jwomeara Jan 28, 2022
24de997
Run the query service tests one by one
ivakegg Jan 31, 2022
381f550
Fixed some issues with hanging tests.
jwomeara Feb 2, 2022
dbf4c68
Allow query service tests to run in parallel.
jwomeara Feb 2, 2022
b7330e6
Added remaining query logics to QueryLogicFactory.xml - many of which…
jwomeara Feb 4, 2022
aa1a88c
Added a RUNNING query status and changed checks appropriately
ivakegg Feb 9, 2022
6494b71
Revert "Added a RUNNING query status and changed checks appropriately"
ivakegg Feb 9, 2022
72f1ca5
Changed query status constants
ivakegg Feb 10, 2022
5df8031
Created separate stages for the create task
ivakegg Feb 11, 2022
5150527
Working on stress testing the system
ivakegg Feb 18, 2022
ff8468a
tweaks to the configurations and scripts for stress testing purposes.
ivakegg Feb 25, 2022
e13704d
Tested edge event, hit hightlights, and term frequency query logics f…
jwomeara Mar 9, 2022
0114153
Updated query metric service to lookup query metrics using the query …
jwomeara Mar 24, 2022
13f2f67
Added translate id functionality and rest endpoints.
jwomeara Apr 1, 2022
23e51f8
Merge branch 'integration' into feature/queryMicroservices
ivakegg Apr 20, 2022
fb74779
Merge remote-tracking branch 'origin/integration' into feature/queryM…
ivakegg Apr 25, 2022
d4f03e4
xml.bind from javax to jakarta
ivakegg Apr 25, 2022
8a5ae94
Revert "xml.bind from javax to jakarta"
ivakegg Apr 26, 2022
2736171
Removed Junit 4 and vintage junit for the query microservices.
jwomeara Apr 29, 2022
d02bb06
Updated to exclude an unused slf4j binder, and log4j 1.x
jwomeara May 4, 2022
50c188a
Moved the table cache reload endpoints, event handler, and monitor in…
ivakegg May 5, 2022
808541a
Completed testing of table cache
ivakegg May 5, 2022
3808921
Updated project layout to combine all services into a single repo, wi…
jwomeara May 12, 2022
a7654e2
Added a module which builds the quickstart docker image. Moved the m…
jwomeara May 20, 2022
6c37a62
Moved project files to root directory.
jwomeara May 25, 2022
a8bcca5
Updated the README
jwomeara May 25, 2022
ac79ddf
Add long running query page retry limit
ivakegg Jun 10, 2022
b98b649
Added a landing page which exposes swagger and javadoc endpoints
jwomeara Jun 10, 2022
27236fe
Updated query help to point to query swagger ui
jwomeara Jun 10, 2022
5dc76ae
Added swagger documentation for the query controller
jwomeara Jun 16, 2022
d24d46d
Added accumulo docs to index.html
jwomeara Jun 17, 2022
95d2e31
Added scm info for the poms
jwomeara Jul 7, 2022
911f0ff
Updated spring boot to 2.7.1
jwomeara Jul 8, 2022
bcc638a
moved classes from 'datawave.services' to 'datawave.core' package
jwomeara Jul 8, 2022
67ca1e1
Updated query logic factory to accept ProxiedUserDetails
jwomeara Jul 11, 2022
4e5040d
Updated to use microservice parent 2.0 and microservice service paren…
jwomeara Oct 17, 2022
ff2fcb7
Simplified the before/after calls in the abstract query service tests
jwomeara Oct 24, 2022
c008712
Increased test timeout length to give tests more time to complete whe…
jwomeara Oct 25, 2022
5df8d96
Updated path of query controller
jwomeara Dec 2, 2022
8bc2bfa
Merge remote-tracking branch 'origin/feature/queryMicroservices' into…
jwomeara Dec 5, 2022
ccb1145
Updated the query service tests to use a common call timeout and incr…
jwomeara Dec 14, 2022
8cce585
Updated test polling to sleep a short while between attempts. Update…
jwomeara Dec 15, 2022
cff03d7
Added swagger docs for map reduce query service.
jwomeara Dec 15, 2022
870a4d9
updated list query logic endpoint in index.html
jwomeara Dec 15, 2022
ba4c096
Renamed ProxiedUserDetails as DatawaveUserDetails
jwomeara Dec 23, 2022
08adc18
Updated the audit api and audit starter versions
jwomeara Feb 10, 2023
0bec65f
Updated query service to add cached results controller
jwomeara Mar 3, 2023
24be5c6
Updated to work with accumulo 2.x
jwomeara Apr 8, 2023
9612f52
bumped datawave version.
jwomeara May 12, 2023
2e185cd
Fixed the query monitor
jwomeara May 19, 2023
279ea06
updated formatting using impsort plugin
jwomeara Jun 27, 2023
45f3605
updated project to not require submodules in order to build
jwomeara Jun 28, 2023
656d8b6
merging latest changes from integration
jwomeara Aug 1, 2023
e90fca7
Moved Query, QueryImpl to query-api
jwomeara Aug 7, 2023
e831a1f
added package-info.java for Query, QueryImpl
jwomeara Aug 14, 2023
6448727
updated pom sorting
jwomeara Aug 15, 2023
0f08d67
Removed unnecessary jackson annotations to address enunciate issues
jwomeara Aug 31, 2023
bb9c27f
Updated with latest changes from integration
jwomeara Sep 14, 2023
8ea1d07
bumped release version
jwomeara Sep 18, 2023
252c516
bumped versions for some modules
jwomeara Oct 5, 2023
4b50234
bumped microservice service parent version
jwomeara Oct 10, 2023
481cf80
Updated versions to use proper semver
jwomeara Oct 20, 2023
f565e33
Updated query service to use pool header, and allow for admin overrid…
jwomeara Nov 16, 2023
b5679b4
Updated lookup uuid to accept multiple terms per field
jwomeara Nov 16, 2023
527ebca
Updated query metric client to pass the server user, and fixed flatte…
jwomeara Nov 22, 2023
15a4dfd
added query metric producer confirm config
jwomeara Nov 22, 2023
f375eef
Adding support for long running queries
ivakegg Dec 1, 2023
44f86cb
updated next call logic for long running queries
jwomeara Dec 6, 2023
9040c0e
Changed from maxLongRunningTimeoutRetries to longRunningQueryTimeout
ivakegg Dec 13, 2023
d096100
Integrated preInitialize and lookup utils updates
ivakegg Dec 23, 2023
8843f1c
Added maven repo access token configuration for github actions
jwomeara Jan 24, 2024
486bb24
Updated LookupService to behave the same as the webservice
jwomeara Feb 9, 2024
87f2bcb
Updated lookup UUID to deal with map of query logics
jwomeara Feb 10, 2024
a7e5a31
Added a result postprocessor when processing events in the next call …
jwomeara Feb 12, 2024
1e8149f
Updated NextCall to republish results to the queue if this is a long …
jwomeara Feb 13, 2024
4a34692
Renamed aggregateResults to reduceResults
jwomeara Feb 14, 2024
b6f180f
Updated tests to set query configuration in query status
jwomeara Feb 14, 2024
d282360
Updated DefaultQueryParameters with latest changes from integration
jwomeara Feb 14, 2024
d0dc2ee
Updated query logic factory to add logic map
jwomeara Mar 6, 2024
86e7774
Implemented authorization and query federation for the query microser…
jwomeara Mar 18, 2024
7e27239
Updating federated user logic to match latest changes on integration
jwomeara Mar 18, 2024
3e7c469
Updated usage of remote user operations for query microservices
jwomeara Mar 19, 2024
ef1a24b
Updated package names for commons.lang3 classes due to type-utils fix
jwomeara Mar 21, 2024
4d1fab3
Excluded log4j from our maven plugins
jwomeara Apr 2, 2024
7798e85
PR feedback
jwomeara Apr 26, 2024
985fa48
PR feedback
jwomeara Apr 26, 2024
196a122
PR feedback
jwomeara Apr 27, 2024
f805cac
PR Feedback
jwomeara Apr 27, 2024
71a748b
PR feedback
jwomeara Apr 29, 2024
3d66b35
pr feedback
jwomeara Apr 29, 2024
c7e32ee
pr feedback
jwomeara May 1, 2024
eed8243
pr feedback
jwomeara May 2, 2024
23743b1
pr feedback
jwomeara May 6, 2024
15754b1
pr feedback
jwomeara May 8, 2024
85cd4e8
formatting
ivakegg May 8, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
23 changes: 23 additions & 0 deletions .github/workflows/settings.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 https://maven.apache.org/xsd/settings-1.0.0.xsd">

<interactiveMode/>

<offline/>

<pluginGroups/>

<mirrors/>

<proxies/>

<servers>
<server>
<id>github-datawave</id>
<username>${env.USER_NAME}</username>
<password>${env.ACCESS_TOKEN}</password>
</server>
</servers>
</settings>
16 changes: 11 additions & 5 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,13 @@ jobs:
${{ runner.os }}-maven-
- name: Format code
run: |
mvn -V -B -e clean formatter:format sortpom:sort -Pautoformat
mvn -s $GITHUB_WORKSPACE/.github/workflows/settings.xml -V -B -e clean formatter:format sortpom:sort -Pautoformat
git status
git diff-index --quiet HEAD || (echo "Error! There are modified files after formatting." && false)
env:
MAVEN_OPTS: "-Dhttps.protocols=TLSv1.2 -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=WARN -Djava.awt.headless=true"
USER_NAME: ${{ secrets.USER_NAME }}
ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }}

# Build the code and run the unit/integration tests.
build-and-test:
Expand All @@ -56,9 +58,11 @@ jobs:
${{ runner.os }}-maven-format-
${{ runner.os }}-maven-
- name: Build and Run Unit Tests
run: mvn -V -B -e -Ddist clean verify
run: mvn -s $GITHUB_WORKSPACE/.github/workflows/settings.xml -V -B -e -Ddist clean verify
env:
MAVEN_OPTS: "-Dhttps.protocols=TLSv1.2 -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=WARN -Djava.awt.headless=true"
USER_NAME: ${{ secrets.USER_NAME }}
ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }}

# Here's an example of how you'd deploy the image to the github package registry.
# We don't want to do this by default since packages on github cannot be deleted
Expand All @@ -68,11 +72,13 @@ jobs:
# env:
# IMAGE_REGISTRY: "docker.pkg.github.com"
# IMAGE_USERNAME: "NationalSecurityAgency"
# USER_NAME: ${{ secrets.USER_NAME }}
# ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }}
# run: |
# # Set up env vars
# IMAGE_NAME=$(mvn -q -N -Pdocker -f service/pom.xml -Dexec.executable='echo' -Dexec.args='${project.version}' exec:exec)
# IMAGE_PREFIX=$(mvn -q -N -Pdocker -f service/pom.xml -Dexec.executable='echo' -Dexec.args='${docker.image.prefix}' exec:exec)
# IMAGE_TAG=$(mvn -q -N -Pdocker -f service/pom.xml -Dexec.executable='echo' -Dexec.args='${project.artifactId}' exec:exec)
# IMAGE_NAME=$(mvn -s $GITHUB_WORKSPACE/.github/workflows/settings.xml -q -N -Pdocker -f service/pom.xml -Dexec.executable='echo' -Dexec.args='${project.version}' exec:exec)
# IMAGE_PREFIX=$(mvn -s $GITHUB_WORKSPACE/.github/workflows/settings.xml -q -N -Pdocker -f service/pom.xml -Dexec.executable='echo' -Dexec.args='${docker.image.prefix}' exec:exec)
# IMAGE_TAG=$(mvn -s $GITHUB_WORKSPACE/.github/workflows/settings.xml -q -N -Pdocker -f service/pom.xml -Dexec.executable='echo' -Dexec.args='${project.artifactId}' exec:exec)
# REMOTE_IMAGE_NAME="${IMAGE_REGISTRY}/${IMAGE_USERNAME}/${IMAGE_PREFIX}${IMAGE_NAME}"
# # Log in to the package registry
# echo ${{ secrets.GITHUB_TOKEN }} | docker login docker.pkg.github.com --username ${GITHUB_ACTOR} --password-stdin
Expand Down
66 changes: 66 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# Query Service

[![Apache License][li]][ll] ![Build Status](https://github.com/NationalSecurityAgency/datawave/workflows/Tests/badge.svg)

The query service is a user-facing DATAWAVE microservice that serves as the main REST interface for DataWave query functionality.

### Query Context

*https://host:port/query/v1/*

### User API

| Done? | New? |Admin? | Method | Operation | Description | Path Param | Request Body | Response Body |
|:--------|:--------|:--------|:--------------|:-----------------------------------------|:-----------------------------------------------------------------------------------------------------------|:------------------------|:-------------------------------|:-------------------------------------------|
| &check; | | | `GET` | /listQueryLogic | List QueryLogic types that are currently available | N/A | N/A | [QueryLogicResponse] |
| &check; | | | `POST` | /{queryLogic}/define | Define a query using the specified query logic and params | [QueryLogicName] | [QueryParameters] | [GenericResponse] |
| &check; | | | `POST` | /{queryLogic}/create | Create a query using the specified query logic and params | [QueryLogicName] | [QueryParameters] | [GenericResponse] |
| &check; | | | `POST` | /{queryLogic}/plan | Generate a query plan using the specified query logic and params | [QueryLogicName] | [QueryParameters] | [GenericResponse] |
| &check; | | | `POST` | /{queryLogic}/predict | Generate a query prediction using the specified query logic and params | [QueryLogicName] | [QueryParameters] | [GenericResponse] |
| &check; | | | <s>`POST`</s> | <s>/{queryLogic}/async/create</s> | <s>Create a query using the specified query logic and params</s> | <s>[QueryLogicName]</s> | <s>[QueryParameters]</s> | <s>[GenericResponse]</s> |
| &check; | | | `PUT` `POST` | /{id}/reset | Resets the specified query | [QueryId] | N/A | <s>[VoidResponse]</s><br>[GenericResponse] |
| &check; | | | `POST` | /{queryLogic}/createAndNext | Create a query using the specified query logic and params, and get the first page | [QueryLogicName] | [QueryParameters] | [BaseQueryResponse] |
| &check; | | | <s>`POST`</s> | <s>/{queryLogic}/async/createAndNext</s> | <s>Create a query using the specified query logic and params, and get the first page</s> | <s>[QueryLogicName]</s> | <s>[QueryParameters]</s> | <s>[BaseQueryResponse]</s> |
| | | | `GET` | /lookupContentUUID/{uuidType}/{uuid} | Returns content associated with the given UUID | [UUIDType], [UUID] | N/A | [BaseQueryResponse] or [StreamingOutput] |
| | | | `POST` | /lookupContentUUID | Returns content associated with the given batch of UUIDs | N/A | [QueryParameters] | [BaseQueryResponse] or [StreamingOutput] |
| | | | `GET` | /lookupUUID/{uuidType}/{uuid} | Returns event associated with the given batch of UUID | [UUIDType], [UUID] | N/A | [BaseQueryResponse] or [StreamingOutput] |
| | | | `POST` | /lookupUUID | Returns event(s) associated with the given batch of UUIDs | N/A | [QueryParameters] | [BaseQueryResponse] or [StreamingOutput] |
| &check; | | | `GET` | /{id}/plan | Returns the plan for the specified query | [QueryId] | N/A | [GenericResponse] |
| &check; | | | `GET` | /{id}/predictions | Returns the predictions for the specified query | [QueryId] | N/A | [GenericResponse] |
| &check; | | | <s>`GET`</s> | <s>/{id}/async/next</s> | <s>Returns the next page of results for the specified query</s> | <s>[QueryId]</s> | <s>N/A</s> | <s>[BaseQueryResponse]</s> |
| &check; | | | `GET` | /{id}/next | Returns the next page of results for the specified query | [QueryId] | N/A | [BaseQueryResponse] |
| &check; | | | `PUT` `POST` | /{id}/close | Closes the specified query | [QueryId] | N/A | [VoidResponse] |
| &check; | | &check; | `PUT` `POST` | /{id}/adminClose | Closes the specified query | [QueryId] | N/A | [VoidResponse] |
| &check; | &check; | &check; | `PUT` `POST` | /adminCloseAll | Closes all running queries | N/A | N/A | [VoidResponse] |
| &check; | | | `PUT` `POST` | /{id}/cancel | Cancels the specified query | [QueryId] | N/A | [VoidResponse] |
| &check; | | &check; | `PUT` `POST` | /{id}/adminCancel | Cancels the specified query | [QueryId] | N/A | [VoidResponse] |
| &check; | &check; | &check; | `PUT` `POST` | /adminCancelAll | Cancels all running queries | N/A | N/A | [VoidResponse] |
| &check; | | | <s>`GET`</s> | <s>/listAll</s> | <s>Returns a list of queries associated with the current user</s> | <s>N/A</s> | <s>N/A</s> | <s>[QueryImplListResponse]</s> |
| &check; | | | `GET` | /{id} | Returns query info for the specified query | [QueryId] | N/A | [QueryImplListResponse] |
| &check; | | | `GET` | /list | Returns a list of queries for this caller, filtering by the (optional) query id, and (optional) query name | N/A | [QueryId], [QueryName] | [QueryImplListResponse] |
| &check; | &check; | &check; | `GET` | /adminList | Returns a list of queries, filtered by the (optional) user, (optional) query id, and (optional) query name | N/A | [User], [QueryId], [QueryName] | [QueryImplListResponse] |
| &check; | | | `DELETE` | /{id}/remove | Remove (delete) the specified query | [QueryId] | N/A | [VoidResponse] |
| &check; | &check; | &check; | `DELETE` | /{id}/adminRemove | Remove (delete) the specified query | [QueryId] | N/A | [VoidResponse] |
| &check; | &check; | &check; | `DELETE` | /{id}/adminRemoveAll | Removes all queries which aren't running | N/A | N/A | [VoidResponse] |
| &check; | | | `POST` | /{id}/duplicate | Duplicates the specified query | [QueryId] | [QueryParameters] | [GenericResponse] |
| &check; | | | `PUT` `POST` | /{id}/update | Updates the specified query | [QueryId] | [QueryParameters] | [GenericResponse] |
| &check; | | | <s>`GET`</s> | <s>/{id}/listAll</s> | <s>Returns a list of queries associated with the specified user</s> | <s>[UserId]</s> | <s>N/A</s> | <s>[QueryImplListResponse]</s> |
| &check; | | | <s>`POST`</s> | <s>/purgeQueryCache</s> | <s>Purges the cache of query objects</s> | <s>N/A</s> | <s>N/A</s> | <s>[VoidResponse]</s> |
| &check; | | | <s>`GET`</s> | <s>/enableTracing</s> | <s>Enables tracing for queries which match the given criteria</s> | <s>N/A</s> | <s>[QueryRegex], [User]</s> | <s>[VoidResponse]</s> |
| &check; | | | <s>`GET`</s> | <s>/disableTracing</s> | <s>Disables tracing for queries which match the given criteria</s> | <s>N/A</s> | <s>[QueryRegex], [User]</s> | <s>[VoidResponse]</s> |
| &check; | | | <s>`GET`</s> | <s>/disableAllTracing</s> | <s>Disables tracing for all queries</s> | <s>N/A</s> | <s>N/A</s> | <s>[VoidResponse]</s> |
| | | | `POST` | /{logicName}/execute | Create a query using the specified query logic and params, and stream the results | [QueryLogicName] | [QueryParameters] | [StreamingOutput] |
| | | | `POST` | /{logicName}/async/execute | Create a query using the specified query logic and params, and stream the results | [QueryLogicName] | [QueryParameters] | [StreamingOutput] |

---

### Getting Started

TBD

For now, refer to the [Datawave Docker Compose Readme][getting-started]

[getting-started]:https://github.com/NationalSecurityAgency/datawave/blob/feature/queryMicroservices/docker/README.md#datawave-docker-compose

[li]: http://img.shields.io/badge/license-ASL-blue.svg
[ll]: https://www.apache.org/licenses/LICENSE-2.0