Skip to content

Add opensearch-java module using java client#1868

Open
dpol1 wants to merge 6 commits intoapache:mainfrom
dpol1:feat/1515-opensearch-java
Open

Add opensearch-java module using java client#1868
dpol1 wants to merge 6 commits intoapache:mainfrom
dpol1:feat/1515-opensearch-java

Conversation

@dpol1
Copy link
Copy Markdown
Contributor

@dpol1 dpol1 commented Apr 3, 2026

Summary

This PR brings external/opensearch-java (the new module targeting OpenSearch Java Client 3.x + Apache HttpClient 5) up to date with the recent refactors landed in external/opensearch, and completes the initial scaffolding by removing duplicated resources that only make sense in the legacy module.

This module migrates StormCrawler from the deprecated RestHighLevelClient to the official opensearch-java client (v3.8.0). Following the community suggestion, this is built as a separate module to act as a drop-in replacement. Users can migrate seamlessly by simply updating their pom.xml artifactId, with zero changes required for Flux topologies or YAML configuration keys.

The legacy external/opensearch module remains untouched in this PR to allow a gradual phase-out.

Architectural Decisions & Engineering

Since the new opensearch-java client introduces a completely different paradigm (fluent builders, strict JSON mappers) and removes several legacy utility classes, the following architectural decisions were made:

1. AsyncBulkProcessor & Backpressure

The legacy BulkProcessor was removed in the new client. To prevent OutOfMemoryErrors and preserve Storm's backpressure, I implemented a custom AsyncBulkProcessor:

  • Buffers BulkOperations and flushes based on action count or a ScheduledExecutorService timer.
  • Uses a Semaphore to limit concurrent in-flight HTTP requests.
  • Uses a dedicated ThreadPoolExecutor with CallerRunsPolicy to process async callbacks without starving the JVM's ForkJoinPool.commonPool().

2. Transport & Modernization (HC5)

I evaluated the transport layer and decided to fully adopt the Apache HttpClient 5 (HC5) via ApacheHttpClient5TransportBuilder.

  • Benefits: Native support for modern HTTP features, better performance, and simplified buffer management.
  • Trade-off: To leverage HC5, the Sniffer has been removed as the official opensearch-rest-client-sniffer is tightly coupled with the legacy HC4 RestClient. Given the goal of modernizing the module, this was deemed an acceptable trade-off for this new 3.x-based implementation.

3. Concurrency & Race Condition Fixes

During the migration, I identified and fixed a race condition in IndexerBolt and DeletionBolt where tuples were added to the processor before being safely locked in the waitAck map. The locking order has been inverted to guarantee zero tuple loss during high-throughput flushes. [implemented in #1869 and aligned in this module as well]

4. Upstream Bugfixes Sync

This module is perfectly aligned with main. It incorporates the recent bugfixes applied to the legacy module, adapted for the new asynchronous paradigm:

5. Maintenance Cleanup

To keep the codebase DRY, I removed duplicated resources that are identical to the legacy module (archetype/, dashboards/, and opensearch-conf.yaml). The module README.md has been rewritten to guide users on how to reference the compatible legacy resources.

Test plan

  • End-to-End Integration: Verified the correct behavior of all Spouts and Bolts (IndexerBolt, StatusUpdaterBolt, DeletionBolt, etc.) against a real OpenSearch instance using Testcontainers.
  • Concurrency & Backpressure: Validated the custom AsyncBulkProcessor under load to ensure it correctly flushes based on size/time thresholds and strictly respects the Semaphore concurrency limits without dropping tuples.
  • Data Serialization: Confirmed correct JSON serialization for complex types, specifically ensuring that nextFetchDate and timestamp fields conform to ISO-8601 format to prevent OpenSearch mapping errors.
  • Archetype Validation: Verified that the updated Maven archetype successfully generates a working StormCrawler project, correctly wired with the new opensearch-java dependency and its associated configurations.
  • Project Compliance: Ensured all static analysis checks pass, including Apache RAT for license headers (with explicit safe exclusions for NDJSON dashboards) and code formatting rules.

Closes #1515

dpol1 added 3 commits April 2, 2026 10:16
- Cloned external/opensearch to external/opensearch-java to introduce the new client as a drop-in replacement.
- Updated Maven artifactId and names in the new local POMs (including the archetype).
- Registered the new module in the root POM.

This commit isolates the pure file duplication. The actual migration to the opensearch-java client will be done in the next commit to ensure a clean, readable Git diff for reviewers.
Introduces the external/opensearch-java module, replacing the deprecated
RestHighLevelClient with the official opensearch-java client. Designed as
a drop-in replacement for `external/opensearch` with identical configurations.

Key improvements:
- Implemented AsyncBulkProcessor (Semaphore + dedicated ThreadPool)
  to ensure strict backpressure and replace the legacy BulkProcessor.
- Fixed historical tuple-ack race conditions in IndexerBolt and DeletionBolt.
- Maintained RestClientTransport to seamlessly support the Sniffer and
  bypass the 100MB response buffer limit.
- Synced recent upstream bugfixes, adapting resource cleanup to the new
  async architecture.
@jnioche
Copy link
Copy Markdown
Contributor

jnioche commented Apr 3, 2026

thanks @dpol1
why not use the 3.x branch of OpenSearch since this is a complete rewrite? If this is to replace the older module in the future, we might as well start with whatever is the most recent.
Are the archetypes and dashboards very different from the existing module? If not, I would be in favour of removing them from here - having duplicates is a pain.
From a user's perspective all they will have to do is modify the name of the dependency

@dpol1
Copy link
Copy Markdown
Contributor Author

dpol1 commented Apr 4, 2026

thanks @dpol1 why not use the 3.x branch of OpenSearch since this is a complete rewrite? If this is to replace the older module in the future, we might as well start with whatever is the most recent.

Will do - I focused on the core logic first (AsyncBulkProcessor for buffers), the 3.x transport migration is next.

Are the archetypes and dashboards very different from the existing module? If not, I would be in favour of removing them from here - having duplicates is a pain.

They are identical to the existing module - removing them in this PR.

From a user's perspective all they will have to do is modify the name of the dependency

Correct - the only change is the artifactId from stormcrawler-opensearch to stormcrawler-opensearch-java. The package path and all YAML config keys remain unchanged.

@jnioche
Copy link
Copy Markdown
Contributor

jnioche commented Apr 4, 2026

During the migration, I identified and fixed a race condition in IndexerBolt and DeletionBolt where tuples were added to the processor before being safely locked in the waitAck map. The locking order has been inverted to guarantee zero tuple loss during high-throughput flushes.

Would be good to fix that in the existing module as a separate PR. Am about to push a refactoring of that module though, so maybe best to do after that if still applies? see #1869

@dpol1
Copy link
Copy Markdown
Contributor Author

dpol1 commented Apr 4, 2026

Thanks by all means, I'll keep the race-condition fix as-is in this module for now. Once your PR on the legacy module lands, I'll double-check the legacy module afterwards and if needed apply to this module as well.

@rzo1
Copy link
Copy Markdown
Contributor

rzo1 commented Apr 7, 2026

Thanks by all means, I'll keep the race-condition fix as-is in this module for now. Once your PR on the legacy module lands, I'll double-check the legacy module afterwards and if needed apply to this module as well.

Think there is only one PR left ( #1869 ) and we can move on.

@rzo1 rzo1 added this to the 3.6.0 milestone Apr 7, 2026
@rzo1
Copy link
Copy Markdown
Contributor

rzo1 commented Apr 10, 2026

@dpol1 Think the blocker is gone.

@dpol1
Copy link
Copy Markdown
Contributor Author

dpol1 commented Apr 10, 2026

Hi @jnioche, Hi @rzo1 - I've just pushed a major update in this PR - let me know what you think when you have a moment! Cheers.

This commit aligns the opensearch-java module with recent legacy updates,
completes the migration to HC5/API 3.x, and cleans up duplicated resources.

Refactors and Alignment:
- Ported DelegateRefresher for dynamic config reloading (apache#1870).
- Adopted Storm V2 metrics bridge via CrawlerMetrics (apache#1846).
- Aligned log messages and metric scopes to OpenSearch (apache#1871).
- Ported WaitAckCache extraction to centralize bulk-ack logic (apache#1869).
- Fixed a race condition in IndexerBolt by inverting the execution order,
  ensuring tuples are registered in waitAck before bulk dispatch.
- Refactored BulkItemResponseToFailedFlag to a Java record with a compact
  constructor for strict null-safety.

Maintenance and Cleanup:
- Removed duplicated archetype, dashboards, and opensearch-conf.yaml
  to prevent maintenance overhead.
- Updated README with a migration guide pointing to legacy resources.
- Removed dead rat-exclude in root pom.xml.
@dpol1 dpol1 force-pushed the feat/1515-opensearch-java branch from de005ac to d530818 Compare April 10, 2026 21:18
@jnioche
Copy link
Copy Markdown
Contributor

jnioche commented Apr 11, 2026

Thanks @dpol1 Looks good, here are a couple of possible issues flagged by Claude

1. Timestamp serialization format change (MAJOR — data-compat risk)

The new module writes timestamps as ISO-8601 strings where the legacy module writes epoch-millis longs:

  • persistence/StatusUpdaterBolt.java:254 — doc.put("nextFetchDate", nextFetch.get().toInstant().toString())
    vs legacy persistence/StatusUpdaterBolt.java:252 — builder.timeField("nextFetchDate", nextFetch.get()) (epoch millis)
  • metrics/MetricsConsumer.java:153 — doc.put("timestamp", timestamp.toInstant().toString())
  • metrics/MetricsReporter.java — same pattern for the metric timestamp field.

Impact depends on index mapping:

  • Indexes using the default date format (strict_date_optional_time||epoch_millis) will accept both — no breakage.
  • Indexes with a custom format: epoch_millis mapping (some deployments use this for compactness) will reject writes from the new module.
  • Mixing writers (legacy + new on the same index) can produce fields with both shapes, which is still queryable but surprising.

Recommendation: either match legacy (toInstant().toEpochMilli()) or document the format change in the module README and make sure the example mappings under src/test/resources/{status,metrics,indexer}.mapping declare a format that
accepts ISO dates.

2. responseBufferSize config key silently dropped (MINOR regression)

Legacy external/opensearch/.../OpenSearchConnection.java:283 reads opensearch.*.responseBufferSize (default 100 MB) and sets it on the HTTP client. The new OpenSearchConnection.java does not reference it. Users who tuned this for large
bulk responses will silently lose the setting on migration. The legacy sample external/opensearch/opensearch-conf.yaml documents the key in four places.

Recommendation: either port the setting to the HC5 client builder or list it as a removed key in the new module's README.

@dpol1
Copy link
Copy Markdown
Contributor Author

dpol1 commented Apr 11, 2026

Thanks @dpol1 Looks good, here are a couple of possible issues flagged by Claude

1. Timestamp serialization format change (MAJOR — data-compat risk)

The new module writes timestamps as ISO-8601 strings where the legacy module writes epoch-millis longs:

  • persistence/StatusUpdaterBolt.java:254 — doc.put("nextFetchDate", nextFetch.get().toInstant().toString())
    vs legacy persistence/StatusUpdaterBolt.java:252 — builder.timeField("nextFetchDate", nextFetch.get()) (epoch millis)

  • metrics/MetricsConsumer.java:153 — doc.put("timestamp", timestamp.toInstant().toString())

  • metrics/MetricsReporter.java — same pattern for the metric timestamp field.

Impact depends on index mapping:

  • Indexes using the default date format (strict_date_optional_time||epoch_millis) will accept both — no breakage.

  • Indexes with a custom format: epoch_millis mapping (some deployments use this for compactness) will reject writes from the new module.

  • Mixing writers (legacy + new on the same index) can produce fields with both shapes, which is still queryable but surprising.

Recommendation: either match legacy (toInstant().toEpochMilli()) or document the format change in the module README and make sure the example mappings under src/test/resources/{status,metrics,indexer}.mapping declare a format that accepts ISO dates.

I tried switching to toEpochMilli(), but it immediately broke AggregationSpout (which expects a String) and caused the tests to fail against the date_optional_time mapping. I thought an hybrid approch which covers both but I don't think is solid - Maybe I forgot something but I've reverted to .toInstant().toString().

2. responseBufferSize config key silently dropped (MINOR regression)

Legacy external/opensearch/.../OpenSearchConnection.java:283 reads opensearch.*.responseBufferSize (default 100 MB) and sets it on the HTTP client. The new OpenSearchConnection.java does not reference it. Users who tuned this for large bulk responses will silently lose the setting on migration. The legacy sample external/opensearch/opensearch-conf.yaml documents the key in four places.

Recommendation: either port the setting to the HC5 client builder or list it as a removed key in the new module's README.

Yes properly documented now and for the sniffer as well!

@jnioche
Copy link
Copy Markdown
Contributor

jnioche commented Apr 11, 2026

@dpol1 did you run a crawl with this new module?

@dpol1
Copy link
Copy Markdown
Contributor Author

dpol1 commented Apr 11, 2026

Yep, run a crawl locally - Injection worked fine, but the crawler blew up with a ClassCastException in AggregationSpout - Think I'll investigate in this way. Suggestions are welcome :-)

18:07:10.547 [main] WARN  o.a.s.s.o.a.z.s.ServerCnxnFactory - maxCnxns is not configured, using default value 0.
		RUNNING public static void org.apache.storm.flux.Flux.main(java.lang.String[]) throws java.lang.Exception with args [crawler.flux]
18:07:13.778 [main] WARN  o.a.s.u.Utils - Topology crawler contains unreachable components "__system"
18:07:17.163 [SLOT_1024] INFO  o.a.s.d.w.LogConfigManager - Started with log levels: {=INFO, org.apache.zookeeper=WARN}
18:07:18.332 [Thread-55-deleter-executor[3, 3]] WARN  o.a.s.o.OpenSearchConnection - Configuration key 'opensearch.indexer.sniff' is set but no longer supported by the opensearch-java module. The OpenSearch Java Client 3.x does not ship a Sniffer equivalent, so automatic node discovery is not available. Keep the 'addresses' list up to date manually or put a load balancer in front of the cluster. See external/opensearch-java/README.md for details.
18:07:18.332 [Thread-53-index-executor[5, 5]] WARN  o.a.s.o.OpenSearchConnection - Configuration key 'opensearch.indexer.sniff' is set but no longer supported by the opensearch-java module. The OpenSearch Java Client 3.x does not ship a Sniffer equivalent, so automatic node discovery is not available. Keep the 'addresses' list up to date manually or put a load balancer in front of the cluster. See external/opensearch-java/README.md for details.
18:07:18.332 [Thread-42-__metrics_org.apache.stormcrawler.opensearch.metrics.MetricsConsumer-executor[2, 2]] WARN  o.a.s.o.OpenSearchConnection - Configuration key 'opensearch.metrics.sniff' is set but no longer supported by the opensearch-java module. The OpenSearch Java Client 3.x does not ship a Sniffer equivalent, so automatic node discovery is not available. Keep the 'addresses' list up to date manually or put a load balancer in front of the cluster. See external/opensearch-java/README.md for details.
18:07:18.353 [Thread-40-__system-executor[-1, -1]] WARN  o.a.s.m.c.CGroupMetricsBase - CGroupCpuStat is disabled. cpu is not a mounted subsystem
18:07:18.354 [Thread-40-__system-executor[-1, -1]] WARN  o.a.s.m.c.CGroupMetricsBase - CGroupMemoryLimit is disabled. memory is not a mounted subsystem
18:07:18.355 [Thread-40-__system-executor[-1, -1]] WARN  o.a.s.m.c.CGroupMetricsBase - CGroupCpuGuaranteeByCfsQuota is disabled. cpu is not a mounted subsystem
18:07:18.356 [Thread-40-__system-executor[-1, -1]] WARN  o.a.s.m.c.CGroupMetricsBase - CGroupMemoryUsage is disabled. memory is not a mounted subsystem
18:07:18.357 [Thread-40-__system-executor[-1, -1]] WARN  o.a.s.m.c.CGroupMetricsBase - CGroupCpu is disabled. cpuacct is not a mounted subsystem
18:07:18.357 [Thread-40-__system-executor[-1, -1]] WARN  o.a.s.m.c.CGroupMetricsBase - CGroupCpuGuarantee is disabled. cpu is not a mounted subsystem
18:07:18.382 [Thread-50-status-executor[20, 20]] WARN  o.a.s.o.OpenSearchConnection - Configuration key 'opensearch.status.sniff' is set but no longer supported by the opensearch-java module. The OpenSearch Java Client 3.x does not ship a Sniffer equivalent, so automatic node discovery is not available. Keep the 'addresses' list up to date manually or put a load balancer in front of the cluster. See external/opensearch-java/README.md for details.
18:07:19.037 [ForkJoinPool.commonPool-worker-8] ERROR o.a.s.o.p.AggregationSpout - [spout #1]  Exception with OpenSearch query
java.lang.ClassCastException: class org.eclipse.parsson.JsonStringImpl cannot be cast to class java.lang.String (org.eclipse.parsson.JsonStringImpl is in unnamed module of loader 'app'; java.lang.String is in module java.base of loader 'bootstrap')
18:07:20.966 [ForkJoinPool.commonPool-worker-7] ERROR o.a.s.o.p.AggregationSpout - [spout #1]  Exception with OpenSearch query
java.lang.ClassCastException: class org.eclipse.parsson.JsonStringImpl cannot be cast to class java.lang.String (org.eclipse.parsson.JsonStringImpl is in unnamed module of loader 'app'; java.lang.String is in module java.base of loader 'bootstrap')
18:07:22.971 [ForkJoinPool.commonPool-worker-3] ERROR o.a.s.o.p.AggregationSpout - [spout #1]  Exception with OpenSearch query
java.lang.ClassCastException: class org.eclipse.parsson.JsonStringImpl cannot be cast to class java.lang.String (org.eclipse.parsson.JsonStringImpl is in unnamed module of loader 'app'; java.lang.String is in module java.base of loader 'bootstrap')
18:07:24.972 [ForkJoinPool.commonPool-worker-5] ERROR o.a.s.o.p.AggregationSpout - [spout #1]  Exception with OpenSearch query
java.lang.ClassCastException: class org.eclipse.parsson.JsonStringImpl cannot be cast to class java.lang.String (org.eclipse.parsson.JsonStringImpl is in unnamed module of loader 'app'; java.lang.String is in module java.base of loader 'bootstrap')
18:07:26.977 [ForkJoinPool.commonPool-worker-1] ERROR o.a.s.o.p.AggregationSpout - [spout #1]  Exception with OpenSearch query
java.lang.ClassCastException: class org.eclipse.parsson.JsonStringImpl cannot be cast to class java.lang.String (org.eclipse.parsson.JsonStringImpl is in unnamed module of loader 'app'; java.lang.String is in module java.base of loader 'bootstrap')
18:07:29.309 [ForkJoinPool.commonPool-worker-8] ERROR o.a.s.o.p.AggregationSpout - [spout #1]  Exception with OpenSearch query
java.lang.ClassCastException: class org.eclipse.parsson.JsonStringImpl cannot be cast to class java.lang.String (org.eclipse.parsson.JsonStringImpl is in unnamed module of loader 'app'; java.lang.String is in module java.base of loader 'bootstrap')
18:07:31.314 [ForkJoinPool.commonPool-worker-10] ERROR o.a.s.o.p.AggregationSpout - [spout #1]  Exception with OpenSearch query
java.lang.ClassCastException: class org.eclipse.parsson.JsonStringImpl cannot be cast to class java.lang.String (org.eclipse.parsson.JsonStringImpl is in unnamed module of loader 'app'; java.lang.String is in module java.base of loader 'bootstrap')
18:07:33.320 [ForkJoinPool.commonPool-worker-21] ERROR o.a.s.o.p.AggregationSpout - [spout #1]  Exception with OpenSearch query
java.lang.ClassCastException: class org.eclipse.parsson.JsonStringImpl cannot be cast to class java.lang.String (org.eclipse.parsson.JsonStringImpl is in unnamed module of loader 'app'; java.lang.String is in module java.base of loader 'bootstrap')
18:07:35.317 [ForkJoinPool.commonPool-worker-6] ERROR o.a.s.o.p.AggregationSpout - [spout #1]  Exception with OpenSearch query
java.lang.ClassCastException: class org.eclipse.parsson.JsonStringImpl cannot be cast to class java.lang.String (org.eclipse.parsson.JsonStringImpl is in unnamed module of loader 'app'; java.lang.String is in module java.base of loader 'bootstrap')
18:07:37.318 [ForkJoinPool.commonPool-worker-10] ERROR o.a.s.o.p.AggregationSpout - [spout #1]  Exception with OpenSearch query
java.lang.ClassCastException: class org.eclipse.parsson.JsonStringImpl cannot be cast to class java.lang.String (org.eclipse.parsson.JsonStringImpl is in unnamed module of loader 'app'; java.lang.String is in module java.base of loader 'bootstrap')
18:07:39.324 [ForkJoinPool.commonPool-worker-21] ERROR o.a.s.o.p.AggregationSpout - [spout #1]  Exception with OpenSearch query
java.lang.ClassCastException: class org.eclipse.parsson.JsonStringImpl cannot be cast to class java.lang.String (org.eclipse.parsson.JsonStringImpl is in unnamed module of loader 'app'; java.lang.String is in module java.base of loader 'bootstrap')
18:07:41.327 [ForkJoinPool.commonPool-worker-9] ERROR o.a.s.o.p.AggregationSpout - [spout #1]  Exception with OpenSearch query
java.lang.ClassCastException: class org.eclipse.parsson.JsonStringImpl cannot be cast to class java.lang.String (org.eclipse.parsson.JsonStringImpl is in unnamed module of loader 'app'; java.lang.String is in module java.base of loader 'bootstrap')
18:07:43.337 [ForkJoinPool.commonPool-worker-5] ERROR o.a.s.o.p.AggregationSpout - [spout #1]  Exception with OpenSearch query
java.lang.ClassCastException: class org.eclipse.parsson.JsonStringImpl cannot be cast to class java.lang.String (org.eclipse.parsson.JsonStringImpl is in unnamed module of loader 'app'; java.lang.String is in module java.base of loader 'bootstrap')
18:07:45.340 [ForkJoinPool.commonPool-worker-21] ERROR o.a.s.o.p.AggregationSpout - [spout #1]  Exception with OpenSearch query
java.lang.ClassCastException: class org.eclipse.parsson.JsonStringImpl cannot be cast to class java.lang.String (org.eclipse.parsson.JsonStringImpl is in unnamed module of loader 'app'; java.lang.String is in module java.base of loader 'bootstrap')
18:07:47.340 [ForkJoinPool.commonPool-worker-2] ERROR o.a.s.o.p.AggregationSpout - [spout #1]  Exception with OpenSearch query
java.lang.ClassCastException: class org.eclipse.parsson.JsonStringImpl cannot be cast to class java.lang.String (org.eclipse.parsson.JsonStringImpl is in unnamed module of loader 'app'; java.lang.String is in module java.base of loader 'bootstrap')
18:07:49.347 [ForkJoinPool.commonPool-worker-1] ERROR o.a.s.o.p.AggregationSpout - [spout #1]  Exception with OpenSearch query
java.lang.ClassCastException: class org.eclipse.parsson.JsonStringImpl cannot be cast to class java.lang.String (org.eclipse.parsson.JsonStringImpl is in unnamed module of loader 'app'; java.lang.String is in module java.base of loader 'bootstrap')
18:07:51.352 [ForkJoinPool.commonPool-worker-1] ERROR o.a.s.o.p.AggregationSpout - [spout #1]  Exception with OpenSearch query
java.lang.ClassCastException: class org.eclipse.parsson.JsonStringImpl cannot be cast to class java.lang.String (org.eclipse.parsson.JsonStringImpl is in unnamed module of loader 'app'; java.lang.String is in module java.base of loader 'bootstrap')
18:07:53.354 [ForkJoinPool.commonPool-worker-10] ERROR o.a.s.o.p.AggregationSpout - [spout #1]  Exception with OpenSearch query
java.lang.ClassCastException: class org.eclipse.parsson.JsonStringImpl cannot be cast to class java.lang.String (org.eclipse.parsson.JsonStringImpl is in unnamed module of loader 'app'; java.lang.String is in module java.base of loader 'bootstrap')
18:07:55.361 [ForkJoinPool.commonPool-worker-2] ERROR o.a.s.o.p.AggregationSpout - [spout #1]  Exception with OpenSearch query
java.lang.ClassCastException: class org.eclipse.parsson.JsonStringImpl cannot be cast to class java.lang.String (org.eclipse.parsson.JsonStringImpl is in unnamed module of loader 'app'; java.lang.String is in module java.base of loader 'bootstrap')
18:07:57.366 [ForkJoinPool.commonPool-worker-10] ERROR o.a.s.o.p.AggregationSpout - [spout #1]  Exception with OpenSearch query
java.lang.ClassCastException: class org.eclipse.parsson.JsonStringImpl cannot be cast to class java.lang.String (org.eclipse.parsson.JsonStringImpl is in unnamed module of loader 'app'; java.lang.String is in module java.base of loader 'bootstrap')
18:07:59.374 [ForkJoinPool.commonPool-worker-2] ERROR o.a.s.o.p.AggregationSpout - [spout #1]  Exception with OpenSearch query
java.lang.ClassCastException: class org.eclipse.parsson.JsonStringImpl cannot be cast to class java.lang.String (org.eclipse.parsson.JsonStringImpl is in unnamed module of loader 'app'; java.lang.String is in module java.base of loader 'bootstrap')
18:08:01.374 [ForkJoinPool.commonPool-worker-1] ERROR o.a.s.o.p.AggregationSpout - [spout #1]  Exception with OpenSearch query
java.lang.ClassCastException: class org.eclipse.parsson.JsonStringImpl cannot be cast to class java.lang.String (org.eclipse.parsson.JsonStringImpl is in unnamed module of loader 'app'; java.lang.String is in module java.base of loader 'bootstrap')
18:08:03.379 [ForkJoinPool.commonPool-worker-21] ERROR o.a.s.o.p.AggregationSpout - [spout #1]  Exception with OpenSearch query
java.lang.ClassCastException: class org.eclipse.parsson.JsonStringImpl cannot be cast to class java.lang.String (org.eclipse.parsson.JsonStringImpl is in unnamed module of loader 'app'; java.lang.String is in module java.base of loader 'bootstrap')
18:08:05.384 [ForkJoinPool.commonPool-worker-5] ERROR o.a.s.o.p.AggregationSpout - [spout #1]  Exception with OpenSearch query
java.lang.ClassCastException: class org.eclipse.parsson.JsonStringImpl cannot be cast to class java.lang.String (org.eclipse.parsson.JsonStringImpl is in unnamed module of loader 'app'; java.lang.String is in module java.base of loader 'bootstrap')
18:08:07.390 [ForkJoinPool.commonPool-worker-5] ERROR o.a.s.o.p.AggregationSpout - [spout #1]  Exception with OpenSearch query
java.lang.ClassCastException: class org.eclipse.parsson.JsonStringImpl cannot be cast to class java.lang.String (org.eclipse.parsson.JsonStringImpl is in unnamed module of loader 'app'; java.lang.String is in module java.base of loader 'bootstrap')
18:08:09.395 [ForkJoinPool.commonPool-worker-2] ERROR o.a.s.o.p.AggregationSpout - [spout #1]  Exception with OpenSearch query
java.lang.ClassCastException: class org.eclipse.parsson.JsonStringImpl cannot be cast to class java.lang.String (org.eclipse.parsson.JsonStringImpl is in unnamed module of loader 'app'; java.lang.String is in module java.base of loader 'bootstrap')
18:08:11.394 [ForkJoinPool.commonPool-worker-9] ERROR o.a.s.o.p.AggregationSpout - [spout #1]  Exception with OpenSearch query
java.lang.ClassCastException: class org.eclipse.parsson.JsonStringImpl cannot be cast to class java.lang.String (org.eclipse.parsson.JsonStringImpl is in unnamed module of loader 'app'; java.lang.String is in module java.base of loader 'bootstrap')
18:08:13.401 [ForkJoinPool.commonPool-worker-9] ERROR o.a.s.o.p.AggregationSpout - [spout #1]  Exception with OpenSearch query
java.lang.ClassCastException: class org.eclipse.parsson.JsonStringImpl cannot be cast to class java.lang.String (org.eclipse.parsson.JsonStringImpl is in unnamed module of loader 'app'; java.lang.String is in module java.base of loader 'bootstrap')
18:08:15.400 [ForkJoinPool.commonPool-worker-16] ERROR o.a.s.o.p.AggregationSpout - [spout #1]  Exception with OpenSearch query
java.lang.ClassCastException: class org.eclipse.parsson.JsonStringImpl cannot be cast to class java.lang.String (org.eclipse.parsson.JsonStringImpl is in unnamed module of loader 'app'; java.lang.String is in module java.base of loader 'bootstrap')
18:08:17.399 [ForkJoinPool.commonPool-worker-10] ERROR o.a.s.o.p.AggregationSpout - [spout #1]  Exception with OpenSearch query
java.lang.ClassCastException: class org.eclipse.parsson.JsonStringImpl cannot be cast to class java.lang.String (org.eclipse.parsson.JsonStringImpl is in unnamed module of loader 'app'; java.lang.String is in module java.base of loader 'bootstrap')
18:08:19.411 [ForkJoinPool.commonPool-worker-5] ERROR o.a.s.o.p.AggregationSpout - [spout #1]  Exception with OpenSearch query
java.lang.ClassCastException: class org.eclipse.parsson.JsonStringImpl cannot be cast to class java.lang.String (org.eclipse.parsson.JsonStringImpl is in unnamed module of loader 'app'; java.lang.String is in module java.base of loader 'bootstrap')
18:08:21.412 [ForkJoinPool.commonPool-worker-10] ERROR o.a.s.o.p.AggregationSpout - [spout #1]  Exception with OpenSearch query
java.lang.ClassCastException: class org.eclipse.parsson.JsonStringImpl cannot be cast to class java.lang.String (org.eclipse.parsson.JsonStringImpl is in unnamed module of loader 'app'; java.lang.String is in module java.base of loader 'bootstrap')
18:08:23.416 [ForkJoinPool.commonPool-worker-10] ERROR o.a.s.o.p.AggregationSpout - [spout #1]  Exception with OpenSearch query
java.lang.ClassCastException: class org.eclipse.parsson.JsonStringImpl cannot be cast to class java.lang.String (org.eclipse.parsson.JsonStringImpl is in unnamed module of loader 'app'; java.lang.String is in module java.base of loader 'bootstrap')
18:08:25.423 [ForkJoinPool.commonPool-worker-2] ERROR o.a.s.o.p.AggregationSpout - [spout #1]  Exception with OpenSearch query
java.lang.ClassCastException: class org.eclipse.parsson.JsonStringImpl cannot be cast to class java.lang.String (org.eclipse.parsson.JsonStringImpl is in unnamed module of loader 'app'; java.lang.String is in module java.base of loader 'bootstrap')
18:08:27.430 [ForkJoinPool.commonPool-worker-16] ERROR o.a.s.o.p.AggregationSpout - [spout #1]  Exception with OpenSearch query
java.lang.ClassCastException: class org.eclipse.parsson.JsonStringImpl cannot be cast to class java.lang.String (org.eclipse.parsson.JsonStringImpl is in unnamed module of loader 'app'; java.lang.String is in module java.base of loader 'bootstrap')
18:08:29.435 [ForkJoinPool.commonPool-worker-2] ERROR o.a.s.o.p.AggregationSpout - [spout #1]  Exception with OpenSearch query
java.lang.ClassCastException: class org.eclipse.parsson.JsonStringImpl cannot be cast to class java.lang.String (org.eclipse.parsson.JsonStringImpl is in unnamed module of loader 'app'; java.lang.String is in module java.base of loader 'bootstrap')
18:08:31.442 [ForkJoinPool.commonPool-worker-16] ERROR o.a.s.o.p.AggregationSpout - [spout #1]  Exception with OpenSearch query
java.lang.ClassCastException: class org.eclipse.parsson.JsonStringImpl cannot be cast to class java.lang.String (org.eclipse.parsson.JsonStringImpl is in unnamed module of loader 'app'; java.lang.String is in module java.base of loader 'bootstrap')
18:08:33.444 [ForkJoinPool.commonPool-worker-10] ERROR o.a.s.o.p.AggregationSpout - [spout #1]  Exception with OpenSearch query
java.lang.ClassCastException: class org.eclipse.parsson.JsonStringImpl cannot be cast to class java.lang.String (org.eclipse.parsson.JsonStringImpl is in unnamed module of loader 'app'; java.lang.String is in module java.base of loader 'bootstrap')
18:08:35.447 [ForkJoinPool.commonPool-worker-16] ERROR o.a.s.o.p.AggregationSpout - [spout #1]  Exception with OpenSearch query
java.lang.ClassCastException: class org.eclipse.parsson.JsonStringImpl cannot be cast to class java.lang.String (org.eclipse.parsson.JsonStringImpl is in unnamed module of loader 'app'; java.lang.String is in module java.base of loader 'bootstrap')
18:08:37.449 [ForkJoinPool.commonPool-worker-10] ERROR o.a.s.o.p.AggregationSpout - [spout #1]  Exception with OpenSearch query
java.lang.ClassCastException: class org.eclipse.parsson.JsonStringImpl cannot be cast to class java.lang.String (org.eclipse.parsson.JsonStringImpl is in unnamed module of loader 'app'; java.lang.String is in module java.base of loader 'bootstrap')
18:08:39.453 [ForkJoinPool.commonPool-worker-2] ERROR o.a.s.o.p.AggregationSpout - [spout #1]  Exception with OpenSearch query
java.lang.ClassCastException: class org.eclipse.parsson.JsonStringImpl cannot be cast to class java.lang.String (org.eclipse.parsson.JsonStringImpl is in unnamed module of loader 'app'; java.lang.String is in module java.base of loader 'bootstrap')
18:08:41.461 [ForkJoinPool.commonPool-worker-10] ERROR o.a.s.o.p.AggregationSpout - [spout #1]  Exception with OpenSearch query
java.lang.ClassCastException: class org.eclipse.parsson.JsonStringImpl cannot be cast to class java.lang.String (org.eclipse.parsson.JsonStringImpl is in unnamed module of loader 'app'; java.lang.String is in module java.base of loader 'bootstrap')
18:08:43.462 [ForkJoinPool.commonPool-worker-6] ERROR o.a.s.o.p.AggregationSpout - [spout #1]  Exception with OpenSearch query
java.lang.ClassCastException: class org.eclipse.parsson.JsonStringImpl cannot be cast to class java.lang.String (org.eclipse.parsson.JsonStringImpl is in unnamed module of loader 'app'; java.lang.String is in module java.base of loader 'bootstrap')
18:08:45.467 [ForkJoinPool.commonPool-worker-6] ERROR o.a.s.o.p.AggregationSpout - [spout #1]  Exception with OpenSearch query
java.lang.ClassCastException: class org.eclipse.parsson.JsonStringImpl cannot be cast to class java.lang.String (org.eclipse.parsson.JsonStringImpl is in unnamed module of loader 'app'; java.lang.String is in module java.base of loader 'bootstrap')
18:08:47.471 [ForkJoinPool.commonPool-worker-5] ERROR o.a.s.o.p.AggregationSpout - [spout #1]  Exception with OpenSearch query
java.lang.ClassCastException: class org.eclipse.parsson.JsonStringImpl cannot be cast to class java.lang.String (org.eclipse.parsson.JsonStringImpl is in unnamed module of loader 'app'; java.lang.String is in module java.base of loader 'bootstrap')
18:08:49.473 [ForkJoinPool.commonPool-worker-2] ERROR o.a.s.o.p.AggregationSpout - [spout #1]  Exception with OpenSearch query
java.lang.ClassCastException: class org.eclipse.parsson.JsonStringImpl cannot be cast to class java.lang.String (org.eclipse.parsson.JsonStringImpl is in unnamed module of loader 'app'; java.lang.String is in module java.base of loader 'bootstrap')
18:08:51.483 [ForkJoinPool.commonPool-worker-16] ERROR o.a.s.o.p.AggregationSpout - [spout #1]  Exception with OpenSearch query
java.lang.ClassCastException: class org.eclipse.parsson.JsonStringImpl cannot be cast to class java.lang.String (org.eclipse.parsson.JsonStringImpl is in unnamed module of loader 'app'; java.lang.String is in module java.base of loader 'bootstrap')
18:08:53.489 [ForkJoinPool.commonPool-worker-6] ERROR o.a.s.o.p.AggregationSpout - [spout #1]  Exception with OpenSearch query
java.lang.ClassCastException: class org.eclipse.parsson.JsonStringImpl cannot be cast to class java.lang.String (org.eclipse.parsson.JsonStringImpl is in unnamed module of loader 'app'; java.lang.String is in module java.base of loader 'bootstrap')
18:08:55.489 [ForkJoinPool.commonPool-worker-6] ERROR o.a.s.o.p.AggregationSpout - [spout #1]  Exception with OpenSearch query
java.lang.ClassCastException: class org.eclipse.parsson.JsonStringImpl cannot be cast to class java.lang.String (org.eclipse.parsson.JsonStringImpl is in unnamed module of loader 'app'; java.lang.String is in module java.base of loader 'bootstrap')
18:08:57.496 [ForkJoinPool.commonPool-worker-10] ERROR o.a.s.o.p.AggregationSpout - [spout #1]  Exception with OpenSearch query
java.lang.ClassCastException: class org.eclipse.parsson.JsonStringImpl cannot be cast to class java.lang.String (org.eclipse.parsson.JsonStringImpl is in unnamed module of loader 'app'; java.lang.String is in module java.base of loader 'bootstrap')
18:08:59.501 [ForkJoinPool.commonPool-worker-16] ERROR o.a.s.o.p.AggregationSpout - [spout #1]  Exception with OpenSearch query
java.lang.ClassCastException: class org.eclipse.parsson.JsonStringImpl cannot be cast to class java.lang.String (org.eclipse.parsson.JsonStringImpl is in unnamed module of loader 'app'; java.lang.String is in module java.base of loader 'bootstrap')
18:09:01.507 [ForkJoinPool.commonPool-worker-2] ERROR o.a.s.o.p.AggregationSpout - [spout #1]  Exception with OpenSearch query
java.lang.ClassCastException: class org.eclipse.parsson.JsonStringImpl cannot be cast to class java.lang.String (org.eclipse.parsson.JsonStringImpl is in unnamed module of loader 'app'; java.lang.String is in module java.base of loader 'bootstrap')
18:09:03.508 [ForkJoinPool.commonPool-worker-10] ERROR o.a.s.o.p.AggregationSpout - [spout #1]  Exception with OpenSearch query
java.lang.ClassCastException: class org.eclipse.parsson.JsonStringImpl cannot be cast to class java.lang.String (org.eclipse.parsson.JsonStringImpl is in unnamed module of loader 'app'; java.lang.String is in module java.base of loader 'bootstrap')
18:09:05.514 [ForkJoinPool.commonPool-worker-5] ERROR o.a.s.o.p.AggregationSpout - [spout #1]  Exception with OpenSearch query
java.lang.ClassCastException: class org.eclipse.parsson.JsonStringImpl cannot be cast to class java.lang.String (org.eclipse.parsson.JsonStringImpl is in unnamed module of loader 'app'; java.lang.String is in module java.base of loader 'bootstrap')
18:09:07.520 [ForkJoinPool.commonPool-worker-16] ERROR o.a.s.o.p.AggregationSpout - [spout #1]  Exception with OpenSearch query
java.lang.ClassCastException: class org.eclipse.parsson.JsonStringImpl cannot be cast to class java.lang.String (org.eclipse.parsson.JsonStringImpl is in unnamed module of loader 'app'; java.lang.String is in module java.base of loader 'bootstrap')
18:09:09.525 [ForkJoinPool.commonPool-worker-16] ERROR o.a.s.o.p.AggregationSpout - [spout #1]  Exception with OpenSearch query
java.lang.ClassCastException: class org.eclipse.parsson.JsonStringImpl cannot be cast to class java.lang.String (org.eclipse.parsson.JsonStringImpl is in unnamed module of loader 'app'; java.lang.String is in module java.base of loader 'bootstrap')
18:09:11.533 [ForkJoinPool.commonPool-worker-6] ERROR o.a.s.o.p.AggregationSpout - [spout #1]  Exception with OpenSearch query
java.lang.ClassCastException: class org.eclipse.parsson.JsonStringImpl cannot be cast to class java.lang.String (org.eclipse.parsson.JsonStringImpl is in unnamed module of loader 'app'; java.lang.String is in module java.base of loader 'bootstrap')
18:09:13.542 [ForkJoinPool.commonPool-worker-6] ERROR o.a.s.o.p.AggregationSpout - [spout #1]  Exception with OpenSearch query
java.lang.ClassCastException: class org.eclipse.parsson.JsonStringImpl cannot be cast to class java.lang.String (org.eclipse.parsson.JsonStringImpl is in unnamed module of loader 'app'; java.lang.String is in module java.base of loader 'bootstrap')
18:09:15.886 [main] WARN  o.a.s.d.s.ReadClusterState - It has taken 1001ms so far and Thread[SLOT_1024,5,main] is still not shut down.
18:09:15.987 [main] WARN  o.a.s.d.s.ReadClusterState - It has taken 1102ms so far and Thread[SLOT_1024,5,main] is still not shut down.
18:09:16.087 [main] WARN  o.a.s.d.s.ReadClusterState - It has taken 1202ms so far and Thread[SLOT_1024,5,main] is still not shut down.
18:09:16.188 [main] WARN  o.a.s.d.s.ReadClusterState - It has taken 1302ms so far and Thread[SLOT_1024,5,main] is still not shut down.
18:09:16.288 [main] WARN  o.a.s.d.s.ReadClusterState - It has taken 1403ms so far and Thread[SLOT_1024,5,main] is still not shut down.
18:09:16.388 [main] WARN  o.a.s.d.s.ReadClusterState - It has taken 1503ms so far and Thread[SLOT_1024,5,main] is still not shut down.
18:09:16.488 [main] WARN  o.a.s.d.s.ReadClusterState - It has taken 1603ms so far and Thread[SLOT_1024,5,main] is still not shut down.
18:09:16.589 [main] WARN  o.a.s.d.s.ReadClusterState - It has taken 1704ms so far and Thread[SLOT_1024,5,main] is still not shut down.
18:09:16.689 [main] WARN  o.a.s.d.s.ReadClusterState - It has taken 1804ms so far and Thread[SLOT_1024,5,main] is still not shut down.
18:09:16.790 [main] WARN  o.a.s.d.s.ReadClusterState - It has taken 1905ms so far and Thread[SLOT_1024,5,main] is still not shut down.
18:09:16.890 [main] WARN  o.a.s.d.s.ReadClusterState - It has taken 2005ms so far and Thread[SLOT_1024,5,main] is still not shut down.
18:09:16.991 [main] WARN  o.a.s.d.s.ReadClusterState - It has taken 2106ms so far and Thread[SLOT_1024,5,main] is still not shut down.
18:09:17.091 [main] WARN  o.a.s.d.s.ReadClusterState - It has taken 2206ms so far and Thread[SLOT_1024,5,main] is still not shut down.
18:09:17.191 [main] WARN  o.a.s.d.s.ReadClusterState - It has taken 2306ms so far and Thread[SLOT_1024,5,main] is still not shut down.
18:09:17.292 [main] WARN  o.a.s.d.s.ReadClusterState - It has taken 2407ms so far and Thread[SLOT_1024,5,main] is still not shut down.
18:09:17.392 [main] WARN  o.a.s.d.s.ReadClusterState - It has taken 2507ms so far and Thread[SLOT_1024,5,main] is still not shut down.
18:09:17.492 [main] WARN  o.a.s.d.s.ReadClusterState - It has taken 2607ms so far and Thread[SLOT_1024,5,main] is still not shut down.
18:09:17.593 [main] WARN  o.a.s.d.s.ReadClusterState - It has taken 2708ms so far and Thread[SLOT_1024,5,main] is still not shut down.
18:09:17.693 [main] WARN  o.a.s.d.s.ReadClusterState - It has taken 2808ms so far and Thread[SLOT_1024,5,main] is still not shut down.
18:09:17.793 [main] WARN  o.a.s.d.s.ReadClusterState - It has taken 2908ms so far and Thread[SLOT_1024,5,main] is still not shut down.
18:09:17.894 [main] WARN  o.a.s.d.s.ReadClusterState - It has taken 3009ms so far and Thread[SLOT_1024,5,main] is still not shut down.
18:09:17.994 [main] WARN  o.a.s.d.s.ReadClusterState - It has taken 3109ms so far and Thread[SLOT_1024,5,main] is still not shut down.
18:09:18.094 [main] WARN  o.a.s.d.s.ReadClusterState - It has taken 3209ms so far and Thread[SLOT_1024,5,main] is still not shut down.
18:09:18.195 [main] WARN  o.a.s.d.s.ReadClusterState - It has taken 3310ms so far and Thread[SLOT_1024,5,main] is still not shut down.
18:09:18.295 [main] WARN  o.a.s.d.s.ReadClusterState - It has taken 3410ms so far and Thread[SLOT_1024,5,main] is still not shut down.


@rzo1
Copy link
Copy Markdown
Contributor

rzo1 commented Apr 11, 2026

Can you Post the full stacktrace?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Improvement] Replace OpenSearch High Level REST Client with Java Client

3 participants