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

Rest only High Level APIs completeness #47678

Closed
3 of 4 tasks
hub-cap opened this issue Oct 7, 2019 · 50 comments
Closed
3 of 4 tasks

Rest only High Level APIs completeness #47678

hub-cap opened this issue Oct 7, 2019 · 50 comments
Labels
>enhancement good first issue low hanging fruit Team:Data Management Meta label for data/management team

Comments

@hub-cap
Copy link
Contributor

hub-cap commented Oct 7, 2019

There are a number of API that are exposed via REST but not via the Transport Client. They don't necessarily have to be implemented if the goal is feature parity with the Transport Client, yet we should probably have a look at why they were not added to the Transport Client and whether it makes sense to add their support to the high-level REST Client or not. I don't think it makes sense to add support for cat API and ingest processor grok, hence I took them out already.

taken from #27205

@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-core-features (:Core/Features/Java High Level REST Client)

@qianyuxiang01
Copy link
Contributor

Do you plan to complete those legacy RHLC api? @hub-cap

@har-vy
Copy link

har-vy commented Oct 9, 2019

Hi @hub-cap, I am a beginner, can I work on this?

@hub-cap
Copy link
Contributor Author

hub-cap commented Oct 10, 2019

@qianyuxiang01 I do not plan to personally complete these. I welcome community submissions.

@har-vy YES U CAN! :D Just pick one, maybe delete alias (the payload on the response is likely smaller so its easier to deal with). Feel free to post up a WIP and ask questions.

@deivids682
Copy link

Hi, @har-vy do you take a look? I can manage to do this one.

@har-vy
Copy link

har-vy commented Oct 13, 2019

@Deivids sure, I would probably have to pass this on.

hub-cap added a commit to hub-cap/elasticsearch that referenced this issue Nov 1, 2019
The delete alias call is a rest only API call, but should still be added
to the rest client. This commit adds it as well as relevant tests.

Ref elastic#47678
@mohamadLy
Copy link

Hi, anyone on this right now. I was thinking picking it up if possible

@hub-cap
Copy link
Contributor Author

hub-cap commented Nov 11, 2019

I have done the delete alias. You can feel free to choose one of the API's and tell me so I can put your name next to it.

@mohamadLy
Copy link

Hub-cap thanks for the quick reply. I think I'll go with the source API

hub-cap added a commit that referenced this issue Nov 11, 2019
The delete alias call is a rest only API call, but should still be added
to the rest client. This commit adds it as well as relevant tests.

Ref #47678
@mohamadLy
Copy link

Hi hub-cap,

I am having issue build the source code. I am trying to build it on ubuntu 18.04. Doesn't seem like java12 exist for ubuntu 18.04. I tried to build with java13 but that did not work either. Do you know any orkaround for this?

I apologize if this is not the right place to post the question.

@andrewjohnson2
Copy link
Contributor

Hi, is anyone doing get upgrade? If not I can take it!

hub-cap added a commit that referenced this issue Nov 12, 2019
The delete alias call is a rest only API call, but should still be added
to the rest client. This commit adds it as well as relevant tests.

Ref #47678
@hub-cap
Copy link
Contributor Author

hub-cap commented Nov 12, 2019

@andrewjohnson2
Copy link
Contributor

Thanks! I am new to the project and trying to understand some things. To clarify, there is a REST API that exposes get upgrade and I need to implement get upgrade in the high level REST client? Where in the codebase is it currently implemented? Thanks

@mohamadLy
Copy link

mohamadLy commented Nov 15, 2019

@andrewjohnson2 I am pretty new to this project also, trying to implement get source. Been doing some investigation on how to go about it. This is the path to the source code where you need to make your changes
https://github.com/elastic/elasticsearch/tree/master/client/rest-high-level/src/main/java/org/elasticsearch/client
I let the others reply to your other question since they are more knowledgeable about the project then I do.
Do you know it is possible to import our custom Rest High Level Client Jar on the different project? What I mean is that I build the source and would like to test my implementation. It would be great if can import that Jar to my little test program to test.

@hrealinho
Copy link

hey guys. first time contributor here, what API would who like me to try and tackle? @hub-cap
Cheers!

@andrewjohnson2
Copy link
Contributor

I did some more research and found this:
https://github.com/elastic/elasticsearch/blob/master/server/src/main/java/org/elasticsearch/rest/action/admin/indices/RestUpgradeStatusAction.java
file which appears to be the existing get upgrade implementation. Is this correct? If so I tried reading the API docs and found that the /_upgrade API has been deprecated? https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-upgrade.html
Any assistance is really appreciated. Thanks!

@hub-cap
Copy link
Contributor Author

hub-cap commented Nov 18, 2019

So, these are tricky APIs since they are REST only. This means they may not have a specific transport action associated w/ them. The best way to find it is what @andrewjohnson2 has pointed out, which is to find the URI of the action in question, _upgrade, in this case, which maps to this.

You are right @andrewjohnson2 that this will be removed in the future, but it still exists today, so its still a valid use case for the client.

@hub-cap
Copy link
Contributor Author

hub-cap commented Nov 18, 2019

@hrealinho you can choose one of the APIs that is not taken above

@andrewjohnson2
Copy link
Contributor

andrewjohnson2 commented Nov 18, 2019

@hub-cap thanks so much! For get upgrade specifically, will the implementation be similar in nature to the delete alias implementation? Such as editing similar files and such? If not do you have any references that could layout what needs to happen in general to implement these APIs? Thanks!

@hub-cap
Copy link
Contributor Author

hub-cap commented Nov 18, 2019

yes @andrewjohnson2 you should be able to use that as a guide.

martijnvg pushed a commit that referenced this issue Jan 23, 2020
martijnvg pushed a commit to martijnvg/elasticsearch that referenced this issue Jan 23, 2020
martijnvg added a commit that referenced this issue Jan 23, 2020
Backport to 7.x branch of #50885.

Relates to #47678

Co-authored-by: Maxim <[email protected]>
@timoninmaxim
Copy link
Contributor

@martijnvg thanks a lot for the help with the tasks. It were my first PRs ever to opensource projects!

@martijnvg
Copy link
Member

@timoninmaxim You're welcome and thank you for picking up these tasks!

@Priya-Raut
Copy link

Is get grok patterns API still available to start working on it?

@jesinity
Copy link
Contributor

It is available if you want ti pick it

@Priya-Raut
Copy link

Priya-Raut commented May 23, 2020

Thanks! I will start working on it then.
@hub-cap could you please put my name next to 'get grok patterns'?

@Priya-Raut
Copy link

Priya-Raut commented May 25, 2020

Hi,
I am trying to contribute to elasticsearch for the first time. I am not able to run the code yet.
After following instructions from CONTRIBUTING.md,

  1. JAVA_HOME is set to JDK 14
  2. The project is imported in Intellij 2020.1
  3. Docker is not set up yet
  4. Ran the command ./gradlew :run

However, it is running forever.
Can someone please point out if I am doing something wrong?

Here are additional details about my environment:
Elasticsearch Build Hamster says Hello!
Gradle Version : 6.4.1
OS Info : Mac OS X 10.14.6 (x86_64)
JDK Version : 14 (Oracle JDK)
JAVA_HOME : /Library/Java/JavaVirtualMachines/jdk-14.jdk/Contents/Home
Random Testing Seed : A339F561FEBB215C
In FIPS 140 mode : false

@tvernum
Copy link
Contributor

tvernum commented May 25, 2020

However, it is running forever.

What does "forever" mean exactly?
Elasticsearch is big, and it takes a fair amount of time to compile, but it should not take hours on modern hardware.

Is the build running, but slowly? Or has it stalled completely (and if so, where)?

@Priya-Raut
Copy link

Priya-Raut commented May 25, 2020

What does "forever" mean exactly?

Right! So, it has been running for about 2 hours now.

Is the build running, but slowly? Or has it stalled completely (and if so, where)?

It has stalled at this line
[2020-05-25T09:08:20,481][INFO ][o.e.x.i.a.TransportPutLifecycleAction] [runTask-0] adding index lifecycle policy [ml-size-based-ilm-policy]

I put the logs at a google doc here:
https://docs.google.com/document/d/1-GSai74eiXt2yQIF1wB1x0bmG-ejEls-eJOP2LEyKfw/edit?usp=sharing

@tvernum
Copy link
Contributor

tvernum commented May 25, 2020

Aha! It's not actually stalled, it's running and waiting for you to do stuff.

I'll open an issue to clarify the CONTRIBUTING instructions - it's definitely not clear from that doc or from the build output that it's at the point where you can actually connect.

At this point you can just connect via curl (in a different terminal session) with

curl -u elastic:password localhost:9200

@Priya-Raut
Copy link

Priya-Raut commented May 25, 2020

@tvernum Thanks a lot! It means I was waiting for nothing ><

I'll open an issue to clarify the CONTRIBUTING instructions - it's definitely not clear from that doc or from the build output that it's at the point where you can actually connect.

Excellent idea!

I got the response! yay!
{
"name" : "runTask-0",
"cluster_name" : "runTask",
"cluster_uuid" : "8FnkV_YLSxmkhxB0yyVYBw",
"version" : {
"number" : "8.0.0-SNAPSHOT",
"build_flavor" : "default",
"build_type" : "tar",
"build_hash" : "2a8b5787466c1e2e478c266db76bd2fba580c1ce",
"build_date" : "2020-05-25T05:37:19.699441Z",
"build_snapshot" : true,
"lucene_version" : "8.6.0",
"minimum_wire_compatibility_version" : "7.9.0",
"minimum_index_compatibility_version" : "7.0.0"
},
"tagline" : "You Know, for Search"
}

@Priya-Raut
Copy link

Priya-Raut commented May 25, 2020

I have started working on the get grok patterns (GET /_ingest/processor/grok) API call to include it in the client.
I have a few queries. Can anyone please help me out? ^^'

  1. (Just to confirm) is this the API we need include in the client?
    https://www.elastic.co/guide/en/elasticsearch/reference/current/grok-processor.html#grok-processor-rest-get

  2. I am planning to put the code in RestHighLevelClient.java
    Is it ok? If not, where should I move it?

  3. Where should the client-side documentation be placed under this location?
    https://www.elastic.co/guide/en/elasticsearch/client/java-rest/7.7/java-rest-high.html
    How about under the 'Miscellaneous API' category?

@sethmlarson
Copy link
Contributor

sethmlarson commented Jul 1, 2020

Back in #27205 there were APIs that were left off the list (because they expose ShardRouting and ClusterState) and that information didn't make the leap to this issue. Is there any plan on implementing these APIs? cc @e-mars

@Chr0nicl3
Copy link

Chr0nicl3 commented Sep 26, 2020

@Priya-Raut are you still working on the solution?
If not, I'd like to work on this issue.
@hub-cap

danhermann pushed a commit to danhermann/elasticsearch that referenced this issue Nov 5, 2020
* Deprecates _upgrade API

Ref elastic#47678

* Move deprecation flags to path section. Add deprecation warning tests for _upgrade API.

Ref elastic#47678
@timothy-choi
Copy link

Hi @hub-cap . Is this issue still open? I would like to work on this issue.

@dakrone
Copy link
Member

dakrone commented Mar 24, 2023

The Java Rest High Level Client has been deprecated (and removed) in later versions of Elasticsearch, in favor of the official Elasticsearch Java Client — https://github.com/elastic/elasticsearch-java

I'm going to close this issue since it is no longer needed.

@dakrone dakrone closed this as completed Mar 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>enhancement good first issue low hanging fruit Team:Data Management Meta label for data/management team
Projects
None yet
Development

No branches or pull requests