[DOCS-7912] Comment on: "manual/reference/method/db.collection.stats.txt" Created: 19/May/16  Updated: 03/Nov/17  Resolved: 24/May/16

Status: Closed
Project: Documentation
Component/s: None
Affects Version/s: None
Fix Version/s: 01112017-cleanup

Type: Bug Priority: Major - P3
Reporter: Docs Collector User (Inactive) Assignee: Unassigned
Resolution: Cannot Reproduce Votes: 0
Labels: collector-298ba4e7
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Mongo 3.2, Java

Location: https://docs.mongodb.com/manual/reference/method/db.collection.stats/
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.102 Safari/537.36
Referrer: https://www.google.com/
Screen Resolution: 2560 x 1440


Participants:
Days since reply: 7 years, 38 weeks ago

 Description   

I don't know where to report this, but there is no obvious way to get stats with the Java 3.2 driver. The getStats() command is only available on deprecated classes.



 Comments   
Comment by Kay Kim (Inactive) [ 26/May/16 ]

Reporter correctly pointed out that DBCollection is to be deprecated as mentioned in blog post.

So sent the following:

MongoDatabase database = mongoClient.getDatabase("mydb");
database.runCommand(new Document("collStats", "myCollection"));

Comment by Kay Kim (Inactive) [ 24/May/16 ]

emailed reporter with following link (which shows getStats is not deprecated)

https://api.mongodb.com/java/3.2/com/mongodb/DBCollection.html#getStats--

Generated at Thu Feb 08 07:55:16 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.