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

Make it possible to use the high level rest client with modularized (jigsaw) applications #38299

Closed
alpar-t opened this issue Feb 4, 2019 · 11 comments
Labels
:Delivery/Build Build or test infrastructure Team:Data Management Meta label for data/management team Team:Delivery Meta label for Delivery team

Comments

@alpar-t
Copy link
Contributor

alpar-t commented Feb 4, 2019

Right now it's not possible to write a modularized java application that talks with Elasticsearch using the High Level Rest Client. This came out of the discussion in #28984.

Since the HLRC depends on server, the application has to require elasticsearch because some of the classes that one would use are in Server, like SearchSourceBuilder.
This won't work because server also has an org.elasticsearch.client package.
The Module system doesn't allow this.

There are other modules that one would have to require, like org.apache.http.HttpHost so these will also have to work as modules.

@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-core-infra

@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-core-features

@alpar-t alpar-t changed the title Make it possible to use the high level with modularized (jigsaw) applications Make it possible to use the high level rest client with modularized (jigsaw) applications Mar 7, 2019
@laurent-thiebaud-gisaia

Any news about it, or a known workaround?

@alpar-t
Copy link
Contributor Author

alpar-t commented Sep 30, 2019

Sorry @laurent-thiebaud-gisaia, no updates so far.
We do plan to work on it but can't promise anything about when that will happen.

@bsevindi
Copy link

Any updates on this?

@rjernst rjernst added Team:Data Management Meta label for data/management team Team:Core/Infra Meta label for core/infra team labels May 4, 2020
@rtenhove
Copy link

rtenhove commented Nov 3, 2020

This just bit me as well. Considering that Java 9 was released over three years ago, and JPMS is not going away, can't we please get a fix for this?

@mark-vieira mark-vieira added Team:Delivery Meta label for Delivery team and removed Team:Core/Infra Meta label for core/infra team labels Nov 11, 2020
@mark-vieira
Copy link
Contributor

Just to clarify, you can use the HLRC in conjunction with a application that leverages JPMS, it just has to be placed on the classpath and not the module path, yes?

@tomdw
Copy link

tomdw commented Jan 29, 2021

@mark-vieira no, as soon as one of your modules on the module path uses the code of the HLRC that HLRC jar needs to be on the modulepath. At least as automatic module or of course as explicit module.

@mark-vieira
Copy link
Contributor

Understood. We could in theory shade the elasticsearch JAR into the HLRC JAR, at which point JPMS should be happy as all the org.elasticsearch.client code is in the same JAR (aka module). Alpar brought up a good point, I'm not sure if the Apache HTTP client is compatible.

@mortharia
Copy link

Any updates or workaround?

@mark-vieira
Copy link
Contributor

The HLRC has been replaced with the new Java client. The new client has no dependency on Elasticsearch so this is no longer an issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Delivery/Build Build or test infrastructure Team:Data Management Meta label for data/management team Team:Delivery Meta label for Delivery team
Projects
None yet
Development

No branches or pull requests

9 participants