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

Added verbose option to segments api, with full ram tree as first additional element per segment #9111

Merged
merged 1 commit into from Jan 6, 2015

Conversation

rjernst
Copy link
Member

@rjernst rjernst commented Dec 31, 2014

This commit adds a verbose flag to the _segments api. Currently the
only additional information returned when set to true is the full
ram tree from lucene for each segment.

Note: I added the ramTree as a public member on the Segment class. This class has a mix of struct like members and some that have getters. It really should be cleaned up, but here I tried to follow what seemed like the most common pattern there.

@rjernst
Copy link
Member Author

rjernst commented Dec 31, 2014

I added docs with an example of how the output format looks in json. You can look at https://issues.apache.org/jira/browse/LUCENE-5949 for more examples of the information available.

writeRamTree(out, ramTree);
}
}

Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe we can add a code comment about why these simple recursive impls are ok, since tree depth should be something tiny like 5 or 6.

Copy link
Member Author

Choose a reason for hiding this comment

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

Sure, added a comment to writeRamTree

@rjernst
Copy link
Member Author

rjernst commented Jan 5, 2015

@jpountz @rmuir I pushed a new commit addressing your comments.

@rjernst rjernst added :Data Management/Stats Statistics tracking and retrieval APIs review labels Jan 5, 2015
@rmuir
Copy link
Contributor

rmuir commented Jan 6, 2015

We should be able to sync this with master now and remove even more code? Adrien upgraded lucene earlier today.

@jpountz
Copy link
Contributor

jpountz commented Jan 6, 2015

There was an open pull request, but it was not merged yet. Now it's merged.

@rjernst
Copy link
Member Author

rjernst commented Jan 6, 2015

Ok, I synced up with latest master.

@jpountz
Copy link
Contributor

jpountz commented Jan 6, 2015

LGTM


/**
* Sets the <code>verbose</code> option.
* @see {@link #verbose}
Copy link
Contributor

Choose a reason for hiding this comment

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

just for ref, im not sure this is really valid.

@rmuir
Copy link
Contributor

rmuir commented Jan 6, 2015

+1 from me too. Thanks Ryan!

additional element per segment.

This commit adds a verbose flag to the _segments api.  Currently the
only additional information returned when set to true is the full
ram tree from lucene for each segment.
@rjernst rjernst merged commit f7f99b8 into elastic:master Jan 6, 2015
@rjernst rjernst removed the review label Jan 6, 2015
@rjernst rjernst deleted the enhancement/mem-stats2 branch January 21, 2015 23:22
@clintongormley clintongormley changed the title Stats: Added verbose option to segments api, with full ram tree as first additional element per segment Added verbose option to segments api, with full ram tree as first additional element per segment Jun 8, 2015
@clintongormley clintongormley changed the title Added verbose option to segments api, with full ram tree as first additional element per segment Added verbose option to segments api, with full ram tree as first additional element per segment Jun 8, 2015
clintongormley added a commit that referenced this pull request Nov 30, 2015
clintongormley added a commit that referenced this pull request Nov 30, 2015
clintongormley added a commit that referenced this pull request Nov 30, 2015
clintongormley added a commit that referenced this pull request Nov 30, 2015
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 v2.0.0-beta1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants