Commit Graph
281 Commits
Author SHA1 Message Date
Kevin Toth 59f5bf4875 Update pom's for 8.7.0-SNAPSHOT 2026-11-10 12:00:47 +00:00
Kevin Toth c81c9fdc12 Update pom's for 8.6.0-SNAPSHOT 2026-10-29 11:47:11 +00:00
Kevin Toth 095ca160b2 Update pom's for 8.5.0-SNAPSHOT 2026-10-22 15:14:39 +00:00
Ivan Bella e4d59a5fa9 Updated springframework to 5.3.39 and security to 5.8.16 for java 17 (#4020) 2026-10-22 14:40:47 +00:00
Kevin Toth 6f5624cc8c Update pom's for 8.4.0-SNAPSHOT 2026-10-13 10:31:37 +00:00
Moriarty 87ec39727b Migrate metadata utils tests to JUnit 5 (#3989) 2026-10-09 13:25:31 +00:00
Kevin Toth 46e2ecddc5 8.2.1-SNAPSHOT 2026-10-05 12:23:56 +00:00
Kevin Toth 9bde7da67e 8.2.0 2026-10-05 12:23:35 +00:00
Kevin Toth a68175c01a Update pom's for 8.3.0-SNAPSHOT 2026-10-05 12:19:46 +00:00
Kevin Toth 045de2e906 Update pom's for 8.2.0-SNAPSHOT 2026-09-21 11:07:38 +00:00
alerman 4f0b97ec72 Task/java17 build baseline (#3907) 2026-09-16 14:24:41 +00:00
Kevin Toth b646acb79b Update pom's for 8.1.0-SNAPSHOT 2026-09-02 15:05:37 +00:00
807d61b52e Migrate to Wildfly 26.1.3.Final (#3508)
Co-authored-by: Ivan Bella <[email protected]>
Co-authored-by: Bill Oley <[email protected]>
Co-authored-by: Moriarty <[email protected]>
Co-authored-by: Claude Opus 5 <[email protected]>
2026-09-02 14:04:28 +00:00
Kevin Toth c8c648e12a Update pom's for 7.47.0-SNAPSHOT 2026-08-31 16:31:44 +00:00
MoriartyandClaude Opus 5 803145b1a7 Fix TypeMetadata serialization race and failure handling (#3870)
toString() built its mini-maps into instance fields, but the metadata
helper cache hands the same TypeMetadata to every concurrent query with
matching auths, so the first serializations after a cache refresh raced
on unsynchronized TreeMaps. They are now built locally and published
once.

Where type metadata is missing or malformed, fail instead of degrading:
folding away an absent ingest type, or parsing a corrupt mini-map, would
normalize values against the wrong types and silently drop valid
results. An empty instance also serialized to an unterminated string the
tablet servers could not parse.

Planning waits could only iterate on a null result and then spun on a
completed future forever, so they now fail fast, and the iterator
setting poll blocks on its future rather than busy-waiting on isDone().

---------

Co-authored-by: Claude Opus 5 <[email protected]>
2026-08-28 11:24:36 +00:00
Kevin Toth ed50f5a76f Update pom's for 7.46.0-SNAPSHOT 2026-08-26 15:39:22 +00:00
Laura SchannoandMoriarty bd25e04589 Improve thread-safety of QueryUncaughtExceptionHandler (#3832)
Make the following changes to improve the thread-safety of
QueryUncaughtExceptionHandler, and add test coverage.
- Generate a sequence for each call to uncaughtException() to help
ensure the first call with a non-null Throwable wins the race,
regardless of which thread's CAS operation completes first.
- In uncaughtException(), atomically update the sequence number, thread,
and throwable at the same time.
- Use an efficient, thread-safe collection for storing and retrieving
messages.

---------

Co-authored-by: Moriarty <[email protected]>
2026-08-24 11:28:57 +00:00
MoriartyandClaude Opus 5 fc48b8b400 Seed and scale down the number normalizer regex fuzzing (#3867)
The test compiled roughly a quarter million patterns from an unseeded
source, so a failure could not be reproduced. A fixed seed, overridable
with datawave.test.seed, now covers ten thousand cases
deterministically.

Co-authored-by: Claude Opus 5 <[email protected]>
2026-08-20 12:35:39 +00:00
hgklohr a3b817a85b Update pom's for 7.45.0-SNAPSHOT 2026-08-13 16:56:05 +00:00
hgklohr 2fa747e48e Update pom's for 7.44.0-SNAPSHOT 2026-08-05 13:44:37 +00:00
MoriartyandClaude Sonnet 5 e77c726718 Migrate ColumnFamilyConstants usages to MetadataColumnFamilyConstants (#3706)
datawave.data.ColumnFamilyConstants is deprecated for removal; switch
all consumers to datawave.table.constants.MetadataColumnFamilyConstants
and add datawave-core-tables as a dependency where it wasn't already on
the classpath.

---------

Co-authored-by: Claude Sonnet 5 <[email protected]>
2026-08-04 12:32:30 +00:00
1ff469c192 migrate scanner to scannerbuilder (#3733)
Migrate most instances of Scanner to using a ScannerBuilder. Another
brick in the road to native scan server support.

---------

Co-authored-by: Claude Sonnet 4.6 <[email protected]>
Co-authored-by: Laura Schanno <[email protected]>
Co-authored-by: alerman <[email protected]>
2026-07-30 08:37:12 +00:00
MoriartyandClaude Sonnet 5 fb87e9194f Add feature-flagged Kryo serialization for TypeMetadata (#3759)
## Summary
- `toString()`/`fromString()` dominated profiler traces
(`HashMap.put`/`calculateHash`) from rebuilding index-to-name lookup
maps per field/value pair; fixes that hot path.
- Adds native Kryo support: `TypeMetadata` implements
`KryoSerializable`, and `TypeMetadataSerializer` wraps it into a Base64
string round trip, reusing its `Kryo`/buffer per instance (matching the
`CandidateResultSerializer` convention) since it's called many times per
thread.
- The Kryo form uses the same mini-map convention as `toString()`: an
ingest type dictionary, a normalizer type dictionary, then one entry per
field name holding its `ingestTypeIndex:normalizerTypeIndex` pairs as
variable length ints. Each name is written exactly once, and `read`
holds both dictionaries as arrays so resolving a pair is an array index
rather than a map rebuild, keeping deserialization O(1) per entry.
- Wires it through a new `kryoTypeMetadata` flag on
`ShardQueryConfiguration`: `DefaultQueryPlanner` serializes via Kryo
when enabled, marking the iterator option so `QueryOptions` decodes it
correctly. The flag is skipped during per-shard type metadata reduction,
since `VisitorFunction` re-serializes via `toString()` afterward and
doesn't understand the Kryo format.
- A parameterized performance test (1/5/20 datatypes x 25/250/2500
fields) shows the Kryo round trip is consistently 1.7-3.0x faster.

## Payload size

The mini-map convention is what keeps the payload smaller than the
string form it replaces. An earlier revision of this branch wrote the
full ingest type and normalizer class name for every field/normalizer
pair, which made it **larger** than `toString()` — measured against the
same fixture, with fully qualified normalizer names:

| datatypes x fields | `toString()` | Kryo, repeated names | Kryo,
mini-map |
| --- | --- | --- | --- |
| 1 x 25 | 526 | 982 (1.87x) | 401 (0.76x) |
| 1 x 2500 | 41,551 | 101,402 (2.44x) | 31,527 (0.76x) |
| 5 x 250 | 8,099 | 49,526 (6.12x) | 5,063 (0.63x) |
| 5 x 2500 | 81,599 | 507,006 (6.21x) | 51,563 (0.63x) |
| 20 x 250 | 25,799 | 198,111 (7.68x) | 12,708 (0.49x) |
| 20 x 2500 | 256,799 | 2,028,031 (7.90x) | 126,708 (0.49x) |

The Kryo form is now 0.49-0.76x of the string form, i.e. 2.5-16x smaller
than writing the names repeatedly.

Two caveats worth noting for review:

- Building the dictionaries and inverting to field-major order is
write-side work the repeated-name layout skipped, so the round trip
speedup drops from 3.1-5.5x to 1.7-3.0x. Both figures are measured on
the same fixture, so this is a real trade: roughly half the speed
advantage in exchange for a payload that is 4-16x smaller and no longer
larger than what it replaces.
- `TypeMetadataSerializer` Base64-encodes on the way out, which adds a
third back. The transported string is therefore at rough parity with
`toString()` for a single ingest type (1.00x) and only pulls ahead from
two ingest types on (0.66-0.94x). The raw Kryo form is smaller in every
combination; Base64 is what consumes the margin at the low end. Both
properties are asserted separately rather than averaged together.

## Test plan
- [x] `metadata-utils` module test suite (379 tests) passes, via
`install` so the enforcer rules run
- [x] Targeted `query-core` suites (`QueryOptionsTest`,
`DefaultQueryPlannerTest`, `DocumentIteratorOptionsTest`,
`VisitorFunctionTest`, `TypeMetadataTest`) pass
- [x] `ColorsTest` exercises the Kryo path end to end through the
planner and iterator
- [x] `TypeMetadataSerializerTest` covers round trip correctness,
instance reuse across differently-sized inputs, and the two payload size
properties above
- [x] `TypeMetadataSerializationPerformanceTest` reports throughput and
payload size across the matrix

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

---------

Co-authored-by: Claude Sonnet 5 <[email protected]>
2026-07-29 16:42:51 +00:00
MoriartyandClaude Opus 4.8 3ddb78cfc3 Add tests pinning scanner session threading defects (#3763)
Covers the unsynchronized read and broken double-checked lock in
QueryUncaughtExceptionHandler, the handler that ScannerSession shares
across every session built from one Query, and the null-executor
handling in BatchScannerSession. The assertions capture current behavior
so the fix has to update them.

Co-authored-by: Claude Opus 4.8 <[email protected]>
2026-07-27 16:40:43 +00:00
hgklohr 3aeffd7c56 Update pom's for 7.43.0-SNAPSHOT 2026-07-21 15:40:23 +00:00
Joseph AlphonsoandJoe Alphonso 429250d296 standardizing MarkingFunction interface so we can use caching (#3688)
bugfix for https://github.com/NationalSecurityAgency/datawave/pull/3469

Co-authored-by: Joe Alphonso <[email protected]>
2026-07-14 22:00:44 +00:00
MoriartyandMr. Patrickus Agbius 89accc21cc RangeStreamScanners now created via builders (#3559)
- RangeStreamScanners now created via builders
- RangeStream constructors that uses scanner factor are deprecated and
marked for removal, including sub classes
- ScannerFactory methods for creating RangeStreamScanners deprecated and
marked for removal.
- DefaultQueryPlanner no longer uses deprecated RangeStream constructor

---------

Co-authored-by: Mr. Patrickus Agbius <[email protected]>
2026-06-30 15:36:13 +00:00
MoriartyandClaude Sonnet 4.6 16e61e196d ban powermock (#3644)
ban powermock dependency and import

---------

Co-authored-by: Claude Sonnet 4.6 <[email protected]>
2026-06-30 13:46:03 +00:00
hgklohr 7691b73e6b Update pom's for 7.42.0-SNAPSHOT 2026-06-18 20:06:11 +00:00
Joe Alphonso b3a6bbd133 Setting next Development version to 7.41.2-SNAPSHOT 2026-06-12 17:29:46 -04:00
Joe Alphonso 8bf504e095 Preparing for 7.41.1 Release 2026-06-12 17:29:01 -04:00
Joe Alphonso 22793bd004 Setting next Development version to 7.41.1-SNAPSHOT 2026-06-12 16:24:06 -04:00
Joe Alphonso f522829b14 Preparing for 7.41.0 Release 2026-06-12 16:20:53 -04: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
hgklohr 872f374ec5 Update pom's for 7.41.0-SNAPSHOT 2026-06-09 17:24:05 +00:00
Moriarty 273e0585be Migrate ColumnFamilyConstants to core/tables (#3582)
Copy ColumnFamilyConstants to MetadataColumnFamilyConstants, deprecate
old
2026-06-05 11:31:10 +00:00
Moriarty e99b1f5b96 ScanBuilders support Set of Authorizations (#3578)
- ScanBuilders now support a set of authorizations, 
- ScannerHelper is used to set multiple visibility filters
- delegate scanners are used to enforce visibility filters
2026-06-03 12:32:03 +00:00
Moriarty d077272c97 Move scan builders to core/utils/accumulo-utils (#3575)
Move scan builders from warehouse/core to core/utils/accumulo-utils
2026-06-02 11:58:13 +00:00
hgklohr d637c2d050 Update pom's for 7.40.0-SNAPSHOT 2026-05-20 11:17:19 +00:00
Moriarty 7bebab9976 Remove PowerMock from ModelKeyParserTest (#3529) (#3545)
- ModelKeyParser uses Clock.millis() instead of System.currentTimeMillis
- ModelKeyParserTest migrated from JUnit4 to JUnit5
- ModelKeyParserTest migrated from PowerMock andEasyMock to Mockito
2026-05-11 09:14:25 +00:00
hgklohr 856ba382de Revert "Remove PowerMock from ModelKeyParserTest" (#3535)
Reverts NationalSecurityAgency/datawave#3529
2026-05-06 15:40:56 -04:00
Moriarty e7420fac73 Remove PowerMock from ModelKeyParserTest (#3529)
- ModelKeyParser uses Clock.millis() instead of System.currentTimeMillis
- ModelKeyParserTest migrated from JUnit4 to JUnit5
- ModelKeyParserTest migrated from PowerMock andEasyMock to Mockito
2026-04-30 18:06:43 +00:00
2e0fc4187b Add ability to enforce concurrent query limits (#3257)
## Configuration
Add the ability to enforce concurrent query limits across a group of
webservers. Zookeeper is used to track active queries and the following
data:
- The query ID
- The user who submitted the query
- The system the query was submitted on
- The query logic the query originated from

Query limit enforcement is done through the `QueryLimiter` class. Given
a user, system, and query logic, it can determine if any of the
following limits have been exceeded:

- The max allowed concurrent queries for the user.
- The max allowed concurrent queries of the query logic for the user.
- The max allowed concurrent queries for the system.
- The max allowed concurrent queries of the query logic for the system.

Limits may be defined and customized on a per-user and per-system basis.
They may also be defined for groups of query logics. The classes
`UserLimitProvider`, `SystemLimitProvider`, and
`QueryLogicGroupLimitProvider` are respectively responsible for
identifying the best limits to enforce for a user, system, and query
logic. They will be initialized in the `QueryLimiter` after providing a
`QueryLimitConfiguration` instance. The following can be configured:

On a system-wide basis:
- The default concurrent user query limit. This applies to the total
number of queries a user may run across all systems. May be overridden
per user.
- The default concurrent system query limit. Primarily to avoid a system
getting overloaded. May be overridden per system.

On a per-system basis:
- The system name/ids the configuration targets. Regex matching is
supported. Pattern uniqueness is enforced.
- The concurrent system query limit. Overrides the system-wide value.
- Whether queries submitted to the system count towards a user's
concurrent query total. This is always true unless specified otherwise.
- The concurrent system query limit for different query logic groups.
Regex matching against group names is supported. Pattern uniqueness is
enforced.

On a per-user basis:
- The user DN.
- The user's concurrent query limit. Overrides the system-wide
configuration.
- The user's concurrent query limit for different query logic groups.
Regex matching against group names is supported.

On a per-query-logic-group basis:
- The group name.
- The query logics included in the group. Regex matching is supported.
Pattern uniqueness is enforced.
- The default concurrent user query limit. This applies to the total
concurrent queries a user may run that originate from a query logic in
the group across all systems.

Given the possibilities for exact matches, partial regex matches, and
wildcard regex matches, the determination of the best limit to use for
any particular system, query logic, or query logic group is done by
sorting matches into the following 'matching buckets' (in best-match
priority):

1. Exact match: We attempt to find an exact match first and use the
associated limit.
2. Partial regex (non-wildcard-only): If we cannot find an exact match,
then we attempt to find all partial matches, and see if any of their
limits are met.
3. Wildcard-only regex: In the case of no exact or partial matches, we
use the wildcard match with the lowest limit.

## Implementation

Checking limits and marking as active/inactive is done through the
`QueryLimiter` class. The three main methods to know are:
- `QueryLimiter.checkForLimits()`
- `QueryLimiter.countQueryTowardsLimits()`
- `QueryLimiter.stopCountingQueryTowardsLimits()`

When a query is marked as active via
`QueryLimiter.countQueryTowardsLimits()`, it will delegate to the
ActiveQueryTracker, which will in turn create nodes in Zookeeper under
the `ActiveQueries` namespace. When `ActiveQueryTracker.trackQuery()` is
called, the following nodes are created:

```
# Container nodes
/users/<userDn>/<queryLogic> # Only for queries on systems that count towards user limit
/systems/<system>/<queryLogic>
/distinctQueryLogics/<queryLogic>  [Only created if it does not exist.]

# Ephemeral nodes. These will auto-delete themselves if their associated Zookeeper connection ever goes down.
/users/<userDn>/<queryLogic>/<queryId> # Only for queries on systems that count towards user limit
/systems/<system>/<queryLogic>/<queryId>
```

`ActiveQueryTracker.trackQuery()` will return a `QueryHeartbeat` that
contain a list of `PersistentNode` (provided by the Apache Curator
library) wrappers around the ephemeral nodes listed above. The
`QueryHeartbeat` will maintain the connection to Zookeeper and attempt
to keep the ephemeral nodes present in Zookeeper until
`QueryHeartbeat.stop()` is called. If `QueryHeartbeat.stop()` is called,
or the webserver crashes, the ephemeral nodes will automatically be
deleted by Zookeeper.

The following error codes have been added:
```
412-20  - Concurrent query limit exceeded
500-164 - Error checking concurrent query limits
```
Closes #3100

---------

Co-authored-by: Bill Oley <[email protected]>
Co-authored-by: foster33 <[email protected]>
Co-authored-by: Ivan Bella <[email protected]>
2026-04-29 16:01:21 +00:00
hgklohr 75e32682d2 Update pom's for 7.39.0-SNAPSHOT 2026-04-27 11:11:00 +00:00
Ivan Bella cf2029fbfc Updated to avoid adding hidden fields when expanding model (#3510)
* Also added minor fixes to avoid periodically failing tests
2026-04-15 16:09:23 -04:00
Moriarty 153bc363f4 Enforce static imports for JUnit5 assertions (#3482)
Do not allow qualified usages of JUnit5 Assertions class (i.e., enforce
static imports)
2026-03-30 20:40:22 +00:00
hgklohr d40f3c82cb Update pom's for 7.38.0-SNAPSHOT 2026-03-30 19:41:29 +00:00
cc9fd1caca Spotless maven plugin (#3478)
replace impsort with spotless maven plugin to automatically cleanup
unused imports
formatting is fast and occurs early in the maven lifecycle  
prevents checkstyle from failing later for unused imports

---------

Co-authored-by: Joe Alphonso <[email protected]>
Co-authored-by: alerman <[email protected]>
2026-03-27 14:03:39 +00:00
Seth Smuckerandfoster33 3c121ac245 Remove non-public Accumulo API usage from ScannerBaseDelegate (#3331)
## Summary
- Remove dependency on non-public Accumulo APIs: `ScannerOptions`,
`IterInfo`
- Track iterator names locally instead of introspecting the delegate
- Remove `ScannerOptionsHelper` inner class
- Simplify `clearScanIterators()` implementation

Fixes #3334
Part of #2443

---------

Co-authored-by: foster33 <[email protected]>
2026-03-26 13:01:24 +00:00
foster33andLaura Schanno c4a99a1bbc Make /validate check for field existence in date range (#3174)
Updates FieldExistenceRule to also verify that there is data in a field
for the given date range.

In the case of an OR node, ALL fields must be missing from the date
range for a failure message to be returned.

---------

Co-authored-by: Laura Schanno <[email protected]>
2026-03-24 19:54:45 +00:00