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

Projects
None yet
5 participants
@mikemccand
Contributor

mikemccand commented Jun 16, 2016

@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.

@litong01

This comment has been minimized.

Show comment
Hide comment
@litong01

litong01 Jun 16, 2016

@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.

litong01 commented Jun 16, 2016

@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

This comment has been minimized.

Show comment
Hide comment
@mikemccand

mikemccand Jun 16, 2016

Contributor

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

Contributor

mikemccand commented Jun 16, 2016

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

@jpountz

This comment has been minimized.

Show comment
Hide comment
@jpountz

jpountz Jun 17, 2016

Contributor

LGTM

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) {

This comment has been minimized.

@bleskes

bleskes Jun 17, 2016

Member

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

@bleskes

bleskes Jun 17, 2016

Member

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

This comment has been minimized.

@jpountz

jpountz Jun 17, 2016

Contributor

hmm agreed it would be nicer that serialization is symmetric

@jpountz

jpountz Jun 17, 2016

Contributor

hmm agreed it would be nicer that serialization is symmetric

@bleskes

This comment has been minimized.

Show comment
Hide comment
@bleskes

bleskes Jun 17, 2016

Member

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

Member

bleskes commented Jun 17, 2016

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

@mikemccand

This comment has been minimized.

Show comment
Hide comment
@mikemccand

mikemccand Jun 20, 2016

Contributor

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

Contributor

mikemccand commented Jun 20, 2016

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;

This comment has been minimized.

@bleskes

bleskes Jun 21, 2016

Member

can this be null now?

@bleskes

bleskes Jun 21, 2016

Member

can this be null now?

This comment has been minimized.

@bleskes

bleskes Jun 21, 2016

Member

ignore that. It can :)

@bleskes

bleskes Jun 21, 2016

Member

ignore that. It can :)

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

This comment has been minimized.

@bleskes

bleskes Jun 22, 2016

Member

++

@bleskes
@mikemccand

This comment has been minimized.

Show comment
Hide comment
@mikemccand

mikemccand Jun 22, 2016

Contributor

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

Contributor

mikemccand commented Jun 22, 2016

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

@bleskes

This comment has been minimized.

Show comment
Hide comment
@bleskes

bleskes Jun 22, 2016

Member

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

Member

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

1 check passed

CLA Commit author is a member of Elasticsearch
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment