-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
extend cat api to get shards information for a specific index #18189
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This could use an integration test.
ClusterIT maybe?
graylog2-server/src/main/java/org/graylog2/indexer/indices/ShardsInfo.java
Outdated
Show resolved
Hide resolved
graylog2-server/src/main/java/org/graylog2/indexer/indices/ShardsInfo.java
Outdated
Show resolved
Hide resolved
graylog2-server/src/test/java/org/graylog2/indexer/cluster/ClusterIT.java
Outdated
Show resolved
Hide resolved
int shard =jsonNode.get("shard").asInt(); | ||
|
||
String ipString = getValueOrDefault(jsonNode, "ip", JsonNode::asText, null); | ||
InetAddress ip = ipString != null ? InetAddress.getByName(ipString) : null; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if that's worth the complexity of having to handle UnknownHostException.
Couldn't we just return the string and let the consumer deal with potentially converting it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
Extending the internal cat api to return shards information for a specific index
part of https://github.com/Graylog2/graylog-plugin-enterprise/issues/6510
part of https://github.com/Graylog2/graylog-plugin-enterprise/issues/6273
/nocl