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 total_indexing_buffer/_in_bytes to nodes info API #18914

Merged
merged 7 commits into from Jun 22, 2016

Conversation

mikemccand
Copy link
Contributor

@bleskes suggested this in #18651.

When you set the indexing buffer (default: 10% of JVM's heap) it's somewhat non-trivial, since it has a buffer size and also min/max, so it would be nice to include what actual indexing buffer the node got
in nodes info.

I just added the indexing buffer size to NodeInfo, and expose it in the nodes info response as total_indexing_buffer (human readable) and total_indexing_buffer_in_bytes.

I also tried to improve the docs for the "core settings" returned by nodes info API.

@mikemccand mikemccand self-assigned this Jun 16, 2016
@clintongormley clintongormley added :Data Management/Stats Statistics tracking and retrieval APIs and removed :Core/Infra/Core Core issues without another label labels Jun 16, 2016
@litong01
Copy link

@mikemccand what happens when the setting is missing? is there a default value? Can not seem to figure out where the setting will be enforced. Thanks.

@mikemccand
Copy link
Contributor Author

@litong01 the setting defaults to 10% of the JVM's heap.

@jpountz
Copy link
Contributor

jpountz commented Jun 17, 2016

LGTM

@@ -240,6 +252,11 @@ public void writeTo(StreamOutput out) throws IOException {
super.writeTo(out);
out.writeVInt(version.id);
Build.writeBuild(build, out);
if (totalIndexingBuffer == null) {
Copy link
Contributor

Choose a reason for hiding this comment

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

why do we follow a different pattern here? should we write a boolean first and restore the null value like other fields?

Copy link
Contributor

Choose a reason for hiding this comment

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

hmm agreed it would be nicer that serialization is symmetric

@bleskes
Copy link
Contributor

bleskes commented Jun 17, 2016

Thx @mikemccand for picking this up - I left some minor comments

@mikemccand
Copy link
Contributor Author

Thank you @bleskes and @jpountz: I folded in the feedback. I think it's ready.

@@ -78,12 +79,16 @@
@Nullable
private IngestInfo ingest;

@Nullable
private ByteSizeValue totalIndexingBuffer;
Copy link
Contributor

Choose a reason for hiding this comment

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

can this be null now?

Copy link
Contributor

Choose a reason for hiding this comment

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

ignore that. It can :)

indexingBuffer = null;
} else {
// pick a random long that sometimes exceeds an int:
indexingBuffer = new ByteSizeValue(random().nextLong() & ((1L<<40)-1));
Copy link
Contributor

Choose a reason for hiding this comment

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

++

@mikemccand
Copy link
Contributor Author

@bleskes I pushed another commit with your feedback, thanks!

@bleskes
Copy link
Contributor

bleskes commented Jun 22, 2016

LGTM. Left one minor comment - no need for another review imo. Thanks again @mikemccand

@mikemccand mikemccand merged commit 14025aa into elastic:master Jun 22, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Data Management/Stats Statistics tracking and retrieval APIs >enhancement v5.0.0-alpha4
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants