Skip to content

Add info method to High Level Rest client#23350

Merged
cbuescher merged 2 commits intoelastic:masterfrom
cbuescher:addInfoHLRestClient
Feb 27, 2017
Merged

Add info method to High Level Rest client#23350
cbuescher merged 2 commits intoelastic:masterfrom
cbuescher:addInfoHLRestClient

Conversation

@cbuescher
Copy link
Copy Markdown
Member

This commit adds support for an info() method to the High Level Rest
client that returns the cluster information usually obtained by performing a
GET hostname:9200 request.

Copy link
Copy Markdown
Contributor

@javanna javanna left a comment

Choose a reason for hiding this comment

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

thanks @cbuescher left a couple of comments, LGTM besides those.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

just double checking: when I added ping I thought it doesn't make sense to have an async variant for it, I tend to think the same for info, but let's discuss it, what do others think?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Is this endpoint documented in the Elasticsearch doc (I didn't find one)? If so, I'd like a link in the Javadoc, otherwise... it's ok :)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

No, it's OK, thanks

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

everybody ok with not having the async version for it?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Yes

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think these tests are run against a single node cluster, but yes it doesn't necessarily hold. just check that the node name is there? Maybe you want to use ObjectPath (although it will do the same internally)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Will do.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

can you get this in separately and backport it? I am fine with pushing without a PR if that's handy. I worry that this PR is targeted to master only and depends on stuff that's outside of the rest-high-level folder.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Will do.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Opened #23352 and will rebase once that is in.

This commit adds support for an info() method to the High Level Rest
client that returns the cluster information usually obtained by performing a
`GET hostname:9200` request.
@cbuescher
Copy link
Copy Markdown
Member Author

@javanna thanks, updated and rebased this after pulling out the changes in MainResponse

Copy link
Copy Markdown
Member

@tlrx tlrx left a comment

Choose a reason for hiding this comment

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

LGTM

}

static Request info() {
return new Request("GET", "/", Collections.emptyMap(), null);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Can you use HttpGet.METHOD_NAME ?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Is this endpoint documented in the Elasticsearch doc (I didn't find one)? If so, I'd like a link in the Javadoc, otherwise... it's ok :)

@cbuescher cbuescher merged commit 3215ac1 into elastic:master Feb 27, 2017
jasontedor added a commit to jasontedor/elasticsearch that referenced this pull request Feb 27, 2017
* master:
  [TEST]  make headers case-insensitive when running yaml tests
  [TEST] randomize request content_type between all of the supported formats
  [TEST] add support for binary responses to REST tests infra
  [TEST] don't check exact size in mapper-size yaml test
  [TEST] move test for binary field to specific test file that sets Content-Type header explicitly
  [TEST] move filters aggs wrapper query builder rewriting test to integ tests
  [TEST] create HttpEntity earlier in REST tests
  [TEST] Remove content type auto-detection while parsing request body in REST tests
  Factor out filling of TopDocs in SearchPhaseController (elastic#23380)
  Add info method to High Level Rest client (elastic#23350)
  Prevent negative `from` parameter in SearchSourceBuilder (elastic#23358)
  reduce the number of iterations in testPrimaryRelocationWhileIndexing and flush every 5
  rollback unneeded change in testNotifyOnDisconnect
  disable sampling in testNotifyOnDisconnect
@cbuescher cbuescher deleted the addInfoHLRestClient branch November 27, 2025 10:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants