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

[Remote Vector Index Build] Introduce RemoteIndexClient skeleton and Build Request construction #2560

Merged

Conversation

owenhalpert
Copy link
Contributor

@owenhalpert owenhalpert commented Feb 25, 2025

Description

First PR for #2518 (Client Skeleton, Build Request)

This PR introduces the initial implementation of the Remote Index client.
In this PR, I have implemented:

  • Client interface + HTTP implementation skeleton, showing overview of the client creation, code flow, etc
    • Updated code flow in RemoteIndexBuildStrategy based on finalized method parameters/return types
  • Programmatic build request construction
  • All client-related settings
  • Extendable RemoteBuildRequest interface and class
  • Client retry strategy
  • Unit tests

In the next PR's, I will implement:

  • Polling mechanism
  • Metric collection
  • Complete unit testing

Related Issues

#2391 Meta Issue
#2393 HLD by @jed326
#2518 My LLD

Check List

  • New functionality includes testing.
    - [ ] New functionality has been documented.
    - [ ] API changes companion pull request created.
  • Commits are signed per the DCO using --signoff.
    - [ ] Public documentation issue/PR created.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

@owenhalpert owenhalpert changed the title Introduce RemoteIndexClient [Remote Vector Index Build] Introduce RemoteIndexClient Feb 25, 2025
@owenhalpert owenhalpert force-pushed the vector-client-skeleton branch from 3fb30f9 to 2095bba Compare February 25, 2025 21:16
@owenhalpert owenhalpert marked this pull request as ready for review February 25, 2025 21:16
@jed326 jed326 added the v3.0.0 label Feb 25, 2025
@owenhalpert owenhalpert force-pushed the vector-client-skeleton branch 2 times, most recently from 8d43195 to 1f8b36d Compare February 26, 2025 01:27
Copy link
Contributor

@jed326 jed326 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @owenhalpert , the approach here LGTM, think we're just missing some tests related to submitVectorBuild and the settings.

@owenhalpert owenhalpert force-pushed the vector-client-skeleton branch 4 times, most recently from 7076818 to a8a4400 Compare February 26, 2025 23:05
@owenhalpert owenhalpert force-pushed the vector-client-skeleton branch from 2b069b8 to 5176e70 Compare February 27, 2025 05:11
Add RemoteIndexClient initial implementation, its accompanying dependencies, and Build Request, Retry Strategy, and test files

Signed-off-by: owenhalpert <ohalpert@gmail.com>

# Conflicts:
#	CHANGELOG.md
#	src/main/java/org/opensearch/knn/index/KNNSettings.java
#	src/main/java/org/opensearch/knn/index/codec/nativeindex/NativeIndexBuildStrategyFactory.java
#	src/main/java/org/opensearch/knn/index/codec/nativeindex/remote/RemoteIndexBuildStrategy.java
#	src/test/java/org/opensearch/knn/index/codec/nativeindex/remote/RemoteIndexBuildStrategyTests.java

# Conflicts:
#	CHANGELOG.md
#	src/main/java/org/opensearch/knn/index/codec/nativeindex/remote/RemoteIndexBuildStrategy.java

# Conflicts:
#	CHANGELOG.md
Extract interface, remove out of scope methods, move build request to client, refactors

Signed-off-by: owenhalpert <ohalpert@gmail.com>
Signed-off-by: owenhalpert <ohalpert@gmail.com>
Signed-off-by: owenhalpert <ohalpert@gmail.com>
Signed-off-by: owenhalpert <ohalpert@gmail.com>
Signed-off-by: owenhalpert <ohalpert@gmail.com>
Signed-off-by: owenhalpert <ohalpert@gmail.com>
Signed-off-by: owenhalpert <ohalpert@gmail.com>
Signed-off-by: owenhalpert <ohalpert@gmail.com>
Signed-off-by: owenhalpert <ohalpert@gmail.com>
Signed-off-by: owenhalpert <ohalpert@gmail.com>
…parameters, secure setting testing

Signed-off-by: owenhalpert <ohalpert@gmail.com>
Signed-off-by: owenhalpert <ohalpert@gmail.com>
Refactor, further delineate responsibilities of client vs. build request, add more abstraction

Signed-off-by: owenhalpert <ohalpert@gmail.com>
…Request using serialization logic (XContent)

Signed-off-by: owenhalpert <ohalpert@gmail.com>
Signed-off-by: owenhalpert <ohalpert@gmail.com>
Signed-off-by: owenhalpert <ohalpert@gmail.com>
@owenhalpert owenhalpert force-pushed the vector-client-skeleton branch 5 times, most recently from 1dc54cd to 6db364c Compare March 4, 2025 06:42
Signed-off-by: owenhalpert <ohalpert@gmail.com>
@owenhalpert owenhalpert force-pushed the vector-client-skeleton branch from 6db364c to 75b1afa Compare March 4, 2025 06:42
Copy link
Member

@jmazanec15 jmazanec15 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants