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

add user defined attributes in _cat/nodes output #12520

Closed
wants to merge 1 commit into from
Closed

add user defined attributes in _cat/nodes output #12520

wants to merge 1 commit into from

Conversation

bookshelfdave
Copy link
Contributor

This PR allows custom node attributes to be displayed via /_cat/nodes.

Because custom node attributes are required to trigger this feature, rest-api-spec doesn't seem to satisfy the testing requirement. What's the best way to test this functionality, and where is a good place for me to start looking?

Here's a sample of the output when running with the following modifications to elasticsearch.yml:

node.rack: rack314
node.azone: us-east-1

Sample output:

$ curl -XGET 'http://localhost:9200/_cat/nodes'
host    ip          heap.percent ram.percent load node.role master name
epsilon 192.168.1.8            1          72 3.10 d         *      Alexander Bont
$ curl -XGET 'http://localhost:9200/_cat/nodes?h=node.rack,node.azone'
node.rack node.azone
  rack314  us-east-1

Closes #8000

@jasontedor
Copy link
Member

This LGTM, but can you add a REST test in elasticsearch/rest-api-spec?

@dakrone
Copy link
Member

dakrone commented Jul 28, 2015

I don't think we currently have a way to add node attributes to the nodes started for the REST tests, @clintongormley do you know if that's currently possible?

@drewr
Copy link
Contributor

drewr commented Jul 29, 2015

Apologies @metadave, I just added a comment to #8000 about the design here. Would you mind taking a look before merging?

@jasontedor
Copy link
Member

@dakrone is correct, it is not currently possible. I investigated the possibility of adding it and I do not think it's worthwhile. The underlying issue is that to enable this functionality, we would no longer be able to reuse the cluster across REST tests (i.e., switch to Scope.TEST from Scope.SUITE). This would take the REST tests from slow to unacceptably slow.

@bookshelfdave
Copy link
Contributor Author

I'm going to close this and work on a new API _cat/nodeattrs that has denormalized attributes. Thanks!

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.

None yet

5 participants