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

_cat/nodes: Thread null handling through stats and info #9938

Merged
merged 1 commit into from Mar 17, 2015

Conversation

drewr
Copy link
Contributor

@drewr drewr commented Mar 1, 2015

Was performing some testing the other day with various kinds of failure scenarios and still ran into /_cat/nodes giving me NPE (reminiscent of #6297). I was able to find at least three or four different objects that turned up null, including JvmStats. To play it safe I'd rather just catch nulls at as many points as we can (until we can use Optional at least). The times when this happens are the most critical -- something is terribly wrong with the cluster -- and an erstwhile useful tool becomes useless.

@drewr
Copy link
Contributor Author

drewr commented Mar 2, 2015

I like the thought of simplifying, but the nulls are actually valuable information. The better enhancement would be to have headers not only be a cosmetic change but keep from generating unneeded stats.

@s1monw
Copy link
Contributor

s1monw commented Mar 17, 2015

I think at some point we should automate this a bit more than it is today and maybe use some reflection to get the info given the names. That said this LGTM as a bugfix while I agree with igor on the simpliciation

drewr added a commit that referenced this pull request Mar 17, 2015
_cat/nodes: Thread null handling through stats and info
@drewr drewr merged commit e49aa2d into elastic:master Mar 17, 2015
@drewr drewr deleted the issue/6297/cat/npe branch March 18, 2015 00: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.

None yet

4 participants