Skip to content

feat(action): implement View, Ingestion, Scale and RemoteStore APIs#16

Merged
marevol merged 2 commits intomainfrom
feat/opensearch3-view-ingestion-scale-apis
Mar 21, 2026
Merged

feat(action): implement View, Ingestion, Scale and RemoteStore APIs#16
marevol merged 2 commits intomainfrom
feat/opensearch3-view-ingestion-scale-apis

Conversation

@marevol
Copy link
Contributor

@marevol marevol commented Mar 21, 2026

Summary

  • Implement HTTP action handlers for OpenSearch 3 View, Streaming Ingestion, Scale Index, and Remote Store Metadata APIs
  • Replace all UnsupportedOperationException stubs with proper execute() delegations across HttpAbstractClient, HttpClient, and HttpIndicesAdminClient
  • Add comprehensive unit tests for all new actions and ByteArrayStreamOutput

Changes Made

  • View API (6 actions): HttpCreateViewAction, HttpGetViewAction, HttpDeleteViewAction, HttpUpdateViewAction, HttpSearchViewAction, HttpListViewNamesAction
  • Streaming Ingestion API (3 actions): HttpPauseIngestionAction, HttpResumeIngestionAction, HttpGetIngestionStateAction
  • Scale Index API: HttpScaleIndexAction for search-only scaling
  • Remote Store Metadata API: HttpRemoteStoreMetadataAction for cluster metadata retrieval
  • CreateIndex enhancement: Added context parameter support for OpenSearch 3
  • Core client wiring: Registered all new actions in HttpClient action map, delegated in HttpAbstractClient and HttpIndicesAdminClient

Testing

  • 13 new unit test classes covering all new action implementations
  • Tests verify URL construction, HTTP method, request body serialization, and response parsing
  • ByteArrayStreamOutputTest added for stream utility coverage

Breaking Changes

  • None. Previously unsupported operations now work instead of throwing exceptions.

marevol added 2 commits March 21, 2026 17:23
…or OpenSearch 3

Add HTTP action implementations for OpenSearch 3 APIs that were previously
throwing UnsupportedOperationException:

- View API: create, get, delete, update, search, and list view names
- Streaming Ingestion API: pause, resume, and get ingestion state
- Scale Index API: search-only scaling support
- Remote Store Metadata API: cluster remote store metadata retrieval
- CreateIndex: add support for context parameter in OpenSearch 3

Includes comprehensive unit tests for all new actions and
ByteArrayStreamOutput.
- HttpGetIngestionStateAction: fully parse ingestion_state per-shard data
  and next_page_token instead of returning empty arrays
- HttpRemoteStoreMetadataAction: fully parse indices/shards metadata
  instead of skipping the indices section
- HttpListViewNamesAction: remove trailing slash from /views/ endpoint
- HttpScaleIndexAction: add setAccessible for package-private class access
  and document why reflection is required
- HttpCreateViewAction/HttpUpdateViewAction: extract buildRequestBody()
  for testability
- HttpListViewNamesAction: extract parseViewNames() for testability
- Update all tests to exercise production code instead of duplicated
  helpers, add payload parsing and URL encoding coverage
@marevol marevol merged commit bdd4332 into main Mar 21, 2026
1 check passed
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.

1 participant