-
Notifications
You must be signed in to change notification settings - Fork 58
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] Communicate implemented extension interfaces to OpenSearch #319
Comments
Hi @dbwiddis, I would like to implement this. I have some work for next couple of days so I will be touching the code on this weekend if it's okay. Thanks and Regards |
Hi @dbwiddis, Can I assign myself this issue? Thanks and Regards |
Hey @varuntumbe sorry for the delay replying here. Go ahead and work on this if you like. Note that at this point none of the other extension interfaces have been written (see #318, #320, #321, #322, #323, #324, #325, #326, #327, #328, #329, #330, #331, #332, and #333). You probably want to do at least one of those to incorporate into the code logic, and then whoever handles those issues can build on the work you did. This will require a PR both here and on the main OpenSearch project. |
Okay, I will assign myself one of those first. Is there any communication channel like slack or discord incase if I want to clear up some doubts? Thanks and regards |
Just ask here on Github if you have any questions! Feel free to tag my username to get my attention faster. |
Sure! I have cloned the repo and trying to get it running in local. Thanks and regards |
Hi @dbwiddis , getting this error while starting the opensearch-sdk-java locally. I am trying to run ./gradlew helloWorld
|
I am quite new to Java, as per my understanding it is trying to get some artifacts as it is declared in the repositories section of build.grade repositories {
mavenLocal()
maven { url "https://aws.oss.sonatype.org/content/repositories/snapshots" }
maven { url "https://d1nvenhzbhpy0q.cloudfront.net/snapshots/lucene/" }
mavenCentral()
} |
Hey @varuntumbe I can build fine but see access denied trying to go to that repository. As a troubleshooting step, try to comment out that lucene snapshot URL in bulid.gradle. I think the appropriate snapshots are published at the aws snapshot url. @saratvemulapalli any idea here? |
Hi @dbwiddis , It did not work. It tries to look for lucene snapshot in .m2/repositories and in other two locations, but it could find those. Let me troubleshoot some more and will get back to you.
|
Usually these artifacts (lucene snapshots) are open to the world. Not sure why @varuntumbe is seeing problems. |
These snapshots are not published to aws.oss or repo.maven given they are not opensearch artifacts. They exist here right now - https://d1nvenhzbhpy0q.cloudfront.net/snapshots/lucene/. Example: |
@varuntumbe @dbwiddis I believe you will want to list mavenCentral before the snapshot repo like this:
So that we aren't searching aws.oss & the lucene snapshot repo for released dependencies. |
I was just coming to that conclusion myself! |
@varuntumbe looks like changing the repo order per this comment will fix things. I'll update our main branch here, you can update your local copy and hopefully build. |
Yes. I was able to get it up and running. Thanks @dbwiddis @saratvemulapalli @mc2 I will assign myself #331 and later will work on this |
Hi @dbwiddis, So far what I have understood is we need to define one enum datatype consisting of all the existing extension Interface inside ExtensionManager ( which is 1st part, which is an easy part :) ) and then during instantiation of Node class it initializes ExtensionManager based on some setting Flag and it has List as one of the data member which has information on all discovered extensions. OpenSearch node does the tcp handshake with the each extension which is running on separate node and exchange some messages ( custom settings etc ). In this communication, we need to inform opensearch Node about the interfaces being implemented by an extension ( which is the 2nd part, little tricky ). Did I understand the issue correctly ? or am I missing something ? Thanks and Regards |
Yep. I think you have it right! |
Hi, I facing issues with compiling opensearch node locally. I was trying to follow steps from 'To run OpenSearch from a compiled binary:' and I gave this command ./gradlew assemble . This is the error I am getting.
FAILURE: Build failed with an exception. I have synced my fork to the latest and pulled latest to local as well. I dont see this getCustomCodecService method in EnginePlugin class. What can I do regarding this ? I need to start opensearch locally so that I can debug the application to understand the transport communications with opensearch SDK Thanks and Regards |
A few ideas:
|
Hi, I have done the 1st step and it gives the same error for run as well |
I think I had deleted here as well by mistake, I did the fresh clone now and its coming up, but one last question, where do we have to place extensions.yml file ? I have placed it under extensions folder under project root dir. its not finding the yml file while loading [2023-02-03T00:01:27,043][INFO ][o.o.e.ExtensionsManager ] [runTask-0] ExtensionsManager initialized |
When you start up OpenSearch it will have a log entry telling you the extensions config dir. Yours is in the log you posted:
I actually have copies of the extensions.yml and run.gradle files in my git root and a bash file in my home directory that I execute to start up OpenSearch and re-copy the files over (they sometimes get erased during a recompile) so change those paths to yours above: #!bash
mkdir -pv /Users/widdisd/git/OpenSearch/distribution/archives/darwin-tar/build/install/opensearch-3.0.0-SNAPSHOT/extensions
cp -v ~/git/extensions.yml /Users/widdisd/git/OpenSearch/distribution/archives/darwin-tar/build/install/opensearch-3.0.0-SNAPSHOT/extensions
cp -v ~/git/run.gradle ~/git/Opensearch/gradle
./gradlew run |
This is helpful, yes I had copied to that location it was getting erased. I will make a batch file or equivalent to this. Thank you. |
Hi @dbwiddis , I have added Request and RequestHandler classes in Open Source Extension package, those classes not getting imported locally for open search SDK ( I am still trying to understand how it works ), i will get this by this week Thanks and regards |
Note the extensions have their own version of |
Yes, I have created a separate classes for Request and Request handler under extension package for registering interfaces. But after defining everything on the open search side, i need to register the request in SDK side in extensionRunner.java, here I am not able to reference ExtensionsManager.<My_New_Defined_Req> or anything that i have defined in the open search side. I thought ./gradlew publishMavenToLocal on open search ( which adds all the artifacts and jars to .m2/repositories/.. ) and running gradlew build --refresh-dependencies on SDK would fix it. But it did not work. Did I miss anything here ? Thanks and regards |
Yes, making the change on your OpenSearch branch and using |
Yes I published to MavenLocal and in sdk I reloaded the workspace and its taking changes. I tested it as well now, its working. I will do a commit today or by tomorrow Thanks and Regards |
Done in #508 |
Is your feature request related to a problem?
Extensions may implement one or more interfaces beyond
Extension
. For example, script engine and context extension points will be implemented on theScriptExtension
. TheExtensionsManager
list of discovered extensions needs to be able to filter that list to determine a subset of extensions which implement specific functionality.What solution would you like?
Create an
Enum
as an inner class of theExtensionsManager
with all of the extension interfaces (see #315 for a list of plugins that need corresponding extensions).Communicate a list of enum values to OpenSearch during initialization and save it in the appropriate object (probably a
List<EnumName>
on theDiscoveryExtensionNode
object).Do you have any additional context?
Review how various plugin interfaces are filtered in
Node.java
. For example,ActionPlugin
are sent to theActionModule
to register rest handlers.ScriptPlugin
are sent to theScriptModule
etc.The text was updated successfully, but these errors were encountered: